OSSP CVS Repository

ossp - Difference in ossp-pkg/lmtp2nntp/lmtp2nntp.c versions 1.50 and 1.51
Not logged in
[Honeypot]  [Browse]  [Home]  [Login]  [Reports
[Search]  [Ticket]  [Timeline
  [History

ossp-pkg/lmtp2nntp/lmtp2nntp.c 1.50 -> 1.51

--- lmtp2nntp.c  2001/09/11 06:41:59     1.50
+++ lmtp2nntp.c  2001/09/11 13:41:22     1.51
@@ -241,7 +241,11 @@
 {
     lmtp2nntp_t *ctx = (lmtp2nntp_t *)_ctx->vp;
             
-    sprintf(bufptr, "%s[%ld]", ctx->progname, (long)getpid());
+    if ((ctx->msg != NULL) &&
+        (ctx->msg->cpFid != NULL))
+        sprintf(bufptr, "%s[%ld]: %s: ", ctx->progname, (long)getpid(), ctx->msg->cpFid);
+    else
+        sprintf(bufptr, "%s[%ld]: ", ctx->progname, (long)getpid());
     *buflen = strlen(bufptr);
     return L2_OK;
 }
@@ -592,7 +596,7 @@
         exit(ERR_EXECUTION);
     }
 
-    if (l2_stream_log(ctx->l2, L2_LEVEL_NOTICE, "%P: startup, version %s", lmtp2nntp_version.v_gnu) != L2_OK) {
+    if (log1(ctx, NOTICE, "startup, version %s", lmtp2nntp_version.v_gnu) != L2_OK) {
         fprintf(stderr, "%s:Error: logging failed to log startup message to stream\n", ctx->progname);
         exit(ERR_EXECUTION);
     }
@@ -637,7 +641,7 @@
     /* graceful shutdown */
     lmtp_gfs_quit(ctx);
     lmtp_gfs_lhlo(ctx);
-    log0(ctx, NOTICE, "%P: graceful shutdown shortly before exit - no more logging");
+    log0(ctx, NOTICE, "graceful shutdown shortly before exit - no more logging");
     l2_stream_destroy(ctx->l2);
     lmtp_destroy(lmtp);
     if (ctx->option_logfile != NULL)
@@ -936,6 +940,8 @@
         free(ctx->cpBindh);
     if (ctx->cpBindp != NULL)
         free(ctx->cpBindp);
+    if (ctx->saBind != NULL)
+        sa_destroy(ctx->saBind);
 }
 
 static int helo_rfc0821domain(char *msg, char **domain)
@@ -1099,6 +1105,7 @@
         res.statusmsg  = "Internal error - memory.";
         CU(LMTP_ERR_MEM);
     }
+    ctx->msg->l2 = ctx->l2;
 
     /*  RFC1652 2. Framework for the 8bit MIME Transport Extension
      *  (4)  one optional parameter using the keyword BODY is added to the MAIL
@@ -1492,8 +1499,9 @@
 
     if (ctx->option_deliverymode == DELIVERYMODE_FAKE) {
         str_format(errorstring, sizeof(errorstring),
-                   "NNTP running in fake mode, delivery of %s %s but delivery status forced to",
+                   "NNTP running in fake mode, delivery of %s [%d bytes] %s but delivery status forced to",
                    ctx->msg->cpMsgid,
+                   strlen(ctx->msg->cpMsg),
                    ((bSuccess == NNTP_OK)    ? "succeeded" :
                     (bSuccess == NNTP_DEFER) ? "deferred"  : "failed"));
         switch (ctx->option_deliverymodefakestatus[0]) {
@@ -1511,9 +1519,11 @@
                 break;
         }
     } else {
-        str_format(errorstring, sizeof(errorstring), "%sdelivery of %s", 
-            ((ctx->option_deliverymode == DELIVERYMODE_POST) ? "post " :
-             (ctx->option_deliverymode == DELIVERYMODE_FEED) ? "feed " : ""), ctx->msg->cpMsgid);
+        str_format(errorstring, sizeof(errorstring), "%sdelivery of %s [%d bytes]", 
+                   ((ctx->option_deliverymode == DELIVERYMODE_POST) ? "post " :
+                   (ctx->option_deliverymode == DELIVERYMODE_FEED) ? "feed " : ""),
+                   ctx->msg->cpMsgid,
+                   strlen(ctx->msg->cpMsg));
         if (bSuccess == NNTP_OK)
             log2(ctx, NOTICE,  "%s %s", errorstring, "succeeded");
         else if(bSuccess == NNTP_DEFER)
@@ -1522,6 +1532,7 @@
             log2(ctx, ERROR,   "%s %s", errorstring, "failed");
     }
 
+
     /*  RFC0821 4.2.1. REPLY CODES BY FUNCTION GROUPS   250 Requested mail action okay, completed
      *                                                  451 Requested action aborted: local error in processing
      *                                                  554 Transaction failed

CVSTrac 2.0.1