OSSP CVS Repository

ossp - Check-in [1162]
Not logged in
[Honeypot]  [Browse]  [Home]  [Login]  [Reports
[Search]  [Ticket]  [Timeline
  [Patchset]  [Tagging/Branching

Check-in Number: 1162
Date: 2001-Oct-12 09:03:45 (local)
2001-Oct-12 07:03:45 (UTC)
User:thl
Branch:
Comment: removed fprintf(stderr, ...) past l2 initialization
Tickets:
Inspections:
Files:
ossp-pkg/lmtp2nntp/lmtp2nntp.c      1.80 -> 1.81     5 inserted, 2 deleted

ossp-pkg/lmtp2nntp/lmtp2nntp.c 1.80 -> 1.81

--- lmtp2nntp.c  2001/10/12 06:58:54     1.80
+++ lmtp2nntp.c  2001/10/12 07:03:45     1.81
@@ -889,6 +889,9 @@
         fprintf(stderr, "%s:Error: logging failed to log startup message to stream\n", ctx->progname);
         CU(ERR_EXECUTION);
     }
+    /* from this point on logging is up and running and fprintf(stderr, ...)
+     * should not be used in the remainder of the code
+     */
 
     if ((ctx->option_pidfile != NULL) && ctx->option_killflag) {
         if ((fd = fopen(ctx->option_pidfile, "r")) == NULL)
@@ -932,7 +935,7 @@
         lmtp_io.read   = hook_lmtp_read;
         lmtp_io.write  = hook_lmtp_write;
         if ((lmtp = lmtp_create(&lmtp_io)) == NULL) {
-            fprintf(stderr, "%s:Error: Unable to initialize LMTP library\n", ctx->progname);
+            log0(ctx, ERROR, "Unable to initialize LMTP library\n");
             CU(ERR_EXECUTION);
         }
         /*  RFC0821, 4.5.1. MINIMUM IMPLEMENTATION
@@ -1056,7 +1059,7 @@
             lmtp_io.read   = hook_lmtp_read;
             lmtp_io.write  = hook_lmtp_write;
             if ((lmtp = lmtp_create(&lmtp_io)) == NULL) {
-                fprintf(stderr, "%s:Error: Unable to initialize LMTP library\n", ctx->progname);
+                log0(ctx, ERROR, "Unable to initialize LMTP library\n");
                 CU(ERR_EXECUTION);
             }
             /*  RFC0821, 4.5.1. MINIMUM IMPLEMENTATION

CVSTrac 2.0.1