--- 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
|