/[monit]/monit/sendmail.c
ViewVC logotype

Diff of /monit/sendmail.c

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

revision 1.37 by hauk, Tue Nov 1 00:28:05 2005 UTC revision 1.38 by martinp, Sat Nov 5 14:09:01 2005 UTC
# Line 98  static void do_send(SendMail_T *S, const Line 98  static void do_send(SendMail_T *S, const
98  /**  /**
99   * Send mail messages via SMTP   * Send mail messages via SMTP
100   * @param mail A Mail object   * @param mail A Mail object
101     * @return FALSE if failed, TRUE if passed
102   */   */
103  void sendmail(Mail_T mail) {  int sendmail(Mail_T mail) {
104    
105    Mail_T m;    Mail_T m;
106    SendMail_T S;    SendMail_T S;
107    char now[STRLEN];    char now[STRLEN];
108      int rv = TRUE;
109        
110    ASSERT(mail);    ASSERT(mail);
111        
112    if(sigsetjmp(S.error, TRUE)) {    if(sigsetjmp(S.error, TRUE)) {
113        rv = FALSE;
114      goto exit;      goto exit;
115    }    }
116    open_server(&S);    open_server(&S);
# Line 150  exit: Line 153  exit:
153    if(S.socket) {    if(S.socket) {
154      socket_free(&S.socket);      socket_free(&S.socket);
155    }    }
156      return rv;
157  }  }
158    
159    
# Line 213  static void open_server(SendMail_T *S) { Line 217  static void open_server(SendMail_T *S) {
217        log("Trying the next mail server '%s:%i'\n", S->server, S->port);        log("Trying the next mail server '%s:%i'\n", S->server, S->port);
218        continue;        continue;
219      } else {      } else {
220        log("No mail servers are available, aborting alert\n");        log("No mail servers are available\n");
       /* FIXME: Add mail to a queue for later retry */  
221        siglongjmp(S->error, TRUE);        siglongjmp(S->error, TRUE);
222      }      }
223    } while(TRUE);    } while(TRUE);

Legend:
Removed from v.1.37  
changed lines
  Added in v.1.38

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