/[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.21 by martinp, Mon Sep 26 15:55:06 2005 UTC revision 1.22 by martinp, Mon Sep 26 19:23:06 2005 UTC
# Line 72  int check_smtp(Socket_T s) { Line 72  int check_smtp(Socket_T s) {
72      log("SMTP: error sending data -- %s\n", STRERROR);      log("SMTP: error sending data -- %s\n", STRERROR);
73      return FALSE;      return FALSE;
74    }    }
75    if(socket_readln(s, buf, sizeof(buf)) <= 0) {  
76      log("SMTP: error receiving data -- %s\n", STRERROR);    /* Check the reply */
77      return FALSE;    do {
78    }      if(socket_readln(s, buf, sizeof(buf)) <= 0) {
79    Util_chomp(buf);        log("SMTP: error receiving data -- %s\n", STRERROR);
80    sscanf(buf, "%d %*s", &status);        return FALSE;
81    if(status != 221) {      }
82      log("SMTP error: %s\n", buf);      Util_chomp(buf);
83      return FALSE;      sscanf(buf, "%d%c%*s", &status, &separator);
84    }      if(status != 221) {
85          log("SMTP error: %s\n", buf);
86          return FALSE;
87        }
88      } while(separator == '-');
89    
90    return TRUE;    return TRUE;
91        

Legend:
Removed from v.1.21  
changed lines
  Added in v.1.22

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