OSSP CVS Repository

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

ossp-pkg/lmtp2nntp/lmtp2nntp.c 1.78 -> 1.79

--- lmtp2nntp.c  2001/10/11 08:01:37     1.78
+++ lmtp2nntp.c  2001/10/11 15:46:48     1.79
@@ -940,8 +940,10 @@
         lmtp_destroy(lmtp);
     } else {
         pid = getpid();
-        if (ctx->option_daemon)
+        if (ctx->option_daemon) {
             daemonize();
+            log1(ctx, NOTICE, "daemonized, previous pid[%d]", pid); l2_stream_flush(ctx->l2);
+        }
         if (ctx->option_pidfile != NULL) {
             if ((fd = fopen(ctx->option_pidfile, "w+")) == NULL)
                 log1(ctx, ERROR, "cannot open pidfile \"%s\" for writing %m", ctx->option_pidfile);
@@ -950,7 +952,6 @@
                 fclose(fd);
             }
         }
-        log1(ctx, NOTICE, "startup daemonized, previous pid[%d]", pid); l2_stream_flush(ctx->l2);
 
         sa_timeout(ctx->saAltio, SA_TIMEOUT_ALL,    0, 0);
         sa_timeout(ctx->saAltio, SA_TIMEOUT_ACCEPT, ctx->option_timeout_lmtp_accept, 0);
@@ -1063,6 +1064,10 @@
             lmtp_destroy(lmtp);
             CU(0);
         }
+        if (rc == SA_ERR_SYS)
+            log3(ctx, ERROR, "accept failed: %s: (%d) %s", sa_error(rc), errno, strerror(errno));
+        else
+            log1(ctx, ERROR, "accept failed: %s", sa_error(rc));
     }
     CU(0);
 

CVSTrac 2.0.1