]> code.citadel.org Git - citadel.git/blobdiff - citadel/modules/smtp/smtp_util.c
fix warnings in libev related codebase
[citadel.git] / citadel / modules / smtp / smtp_util.c
index 304269afe2beda157ea8c4033770448ffc7d1e3d..1db154635cc84e30b92499d20a00e136b8401351 100644 (file)
@@ -116,7 +116,6 @@ void smtp_do_bounce(char *instr, StrBuf *OMsgTxt)
        StrBuf *boundary;
        int num_bounces = 0;
        int bounce_this = 0;
-       long bounce_msgid = (-1);
        time_t submitted = 0L;
        struct CtdlMessage *bmsg = NULL;
        int give_up = 0;
@@ -126,7 +125,7 @@ void smtp_do_bounce(char *instr, StrBuf *OMsgTxt)
        StrBuf *BounceMB;
        long omsgid = (-1);
 
-       CtdlLogPrintf(CTDL_DEBUG, "smtp_do_bounce() called\n");
+       syslog(LOG_DEBUG, "smtp_do_bounce() called\n");
        strcpy(bounceto, "");
        boundary = NewStrBufPlain(HKEY("=_Citadel_Multipart_"));
        StrBufAppendPrintf(boundary, "%s_%04x%04x", config.c_fqdn, getpid(), ++seq);
@@ -195,8 +194,8 @@ void smtp_do_bounce(char *instr, StrBuf *OMsgTxt)
                dsnlen = extract_token(dsn, buf, 3, '|', sizeof dsn);
                bounce_this = 0;
 
-               CtdlLogPrintf(CTDL_DEBUG, "key=<%s> addr=<%s> status=%d dsn=<%s>\n",
-                       key, addr, status, dsn);
+               syslog(LOG_DEBUG, "key=<%s> addr=<%s> status=%d dsn=<%s>\n",
+                      key, addr, status, dsn);
 
                if (!strcasecmp(key, "bounceto")) {
                        strcpy(bounceto, addr);
@@ -254,16 +253,14 @@ void smtp_do_bounce(char *instr, StrBuf *OMsgTxt)
                free(bmsg->cm_fields['A']);
        bmsg->cm_fields['A'] = SmashStrBuf(&BounceMB);
        /* Deliver the bounce if there's anything worth mentioning */
-       CtdlLogPrintf(CTDL_DEBUG, "num_bounces = %d\n", num_bounces);
+       syslog(LOG_DEBUG, "num_bounces = %d\n", num_bounces);
        if (num_bounces > 0) {
 
                /* First try the user who sent the message */
-               CtdlLogPrintf(CTDL_DEBUG, "bounce to user? <%s>\n", bounceto);
-               if (IsEmptyStr(bounceto)) {
-                       CtdlLogPrintf(CTDL_ERR, "No bounce address specified\n");
-                       bounce_msgid = (-1L);
-               }
-
+               if (IsEmptyStr(bounceto)) 
+                       syslog(LOG_ERR, "No bounce address specified\n");
+               else
+                       syslog(LOG_DEBUG, "bounce to user <%s>\n", bounceto);
                /* Can we deliver the bounce to the original sender? */
                valid = validate_recipients(bounceto, smtp_get_Recipients (), 0);
                if (valid != NULL) {
@@ -285,5 +282,5 @@ void smtp_do_bounce(char *instr, StrBuf *OMsgTxt)
        }
        FreeStrBuf(&boundary);
        CtdlFreeMessage(bmsg);
-       CtdlLogPrintf(CTDL_DEBUG, "Done processing bounces\n");
+       syslog(LOG_DEBUG, "Done processing bounces\n");
 }