/[monit]/monit/protocols/smtp.c
ViewVC logotype

Diff of /monit/protocols/smtp.c

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.19 by hauk, Sat Sep 10 12:34:29 2005 UTC revision 1.20 by hauk, Sat Sep 10 12:47:51 2005 UTC
# Line 48  int check_smtp(Socket_T s) { Line 48  int check_smtp(Socket_T s) {
48    
49    int status;    int status;
50    char buf[STRLEN];    char buf[STRLEN];
   char msg[STRLEN];  
51    
52    ASSERT(s);    ASSERT(s);
53    
# Line 59  int check_smtp(Socket_T s) { Line 58  int check_smtp(Socket_T s) {
58    
59    Util_chomp(buf);    Util_chomp(buf);
60        
61    sscanf(buf, "%d %s", &status, msg);    sscanf(buf, "%d %*s", &status);
62    if(status != 220) {    if(status != 220) {
63      log("SMTP error: %s\n", buf);      log("SMTP error: %s\n", buf);
64      return FALSE;      return FALSE;
# Line 82  int check_smtp(Socket_T s) { Line 81  int check_smtp(Socket_T s) {
81    
82    Util_chomp(buf);    Util_chomp(buf);
83        
84    sscanf(buf, "%d %s", &status, msg);    sscanf(buf, "%d %*s", &status);
85    if(status != 221) {    if(status != 221) {
86      log("SMTP error: %s\n", buf);      log("SMTP error: %s\n", buf);
87      return FALSE;      return FALSE;

Legend:
Removed from v.1.19  
changed lines
  Added in v.1.20

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26