From 93025e3732f2b312516ecb059768a3577c9e46f1 Mon Sep 17 00:00:00 2001 From: "Eric S. Raymond" Date: Sat, 5 Apr 1997 16:57:50 +0000 Subject: Robert de Bath's changes. svn path=/trunk/; revision=952 --- driver.c | 7 ++++--- fetchmail.man | 2 +- options.c | 4 ++-- report.c | 2 +- 4 files changed, 8 insertions(+), 7 deletions(-) diff --git a/driver.c b/driver.c index 4fa9e73c..9045fcc7 100644 --- a/driver.c +++ b/driver.c @@ -710,7 +710,8 @@ char *realname; /* real name of host */ if (!ctl->mda && ((sinkfp = smtp_open(ctl)) == NULL)) { free_str_list(&xmit_names); - error(0, 0, "SMTP connect to %s failed", ctl->smtphost); + error(0, 0, "SMTP connect to %s failed", + ctl->smtphost ? ctl->smtphost : "localhost"); if (return_path) free(return_path); return(PS_SMTP); @@ -1070,7 +1071,7 @@ char *realname; /* real name of host */ signal(SIGCHLD, sigchld); if (rc) { - error(0, 0, "MDA exited abnormally or returned nonzero status"); + error(0, -1, "MDA exited abnormally or returned nonzero status"); return(PS_IOERR); } } @@ -1079,7 +1080,7 @@ char *realname; /* real name of host */ /* write message terminator */ if (SMTP_eom(sinkfp) != SM_OK) { - error(0, 0, "SMTP listener refused delivery"); + error(0, -1, "SMTP listener refused delivery"); ctl->errcount++; return(PS_TRANSIENT); } diff --git a/fetchmail.man b/fetchmail.man index c929350f..172e676b 100644 --- a/fetchmail.man +++ b/fetchmail.man @@ -207,7 +207,7 @@ listener before the connection is deliberately torn down and rebuilt (defaults to 0, meaning no limit). While \fBsendmail\fR(8) normally initiates delivery of a message immediately after receiving the message terminator, some SMTP listeners are not so prompt. MTAs like -\fIqmail\fR(8) and \fIsmail\fR(8) will wait till the delivery socket is +\fIqmail\fR(8) and \fIsmail\fR(8) may wait till the delivery socket is shut down to deliver. This may produce annoying delays when .IR fetchmail (8) is processing very large batches. Setting the batch limit to some diff --git a/options.c b/options.c index b22e801c..13df2277 100644 --- a/options.c +++ b/options.c @@ -307,9 +307,9 @@ struct query *ctl; /* option record to be initialized */ return(-1); } - if (poll_interval == 0 && use_syslog) + if ((poll_interval == 0 || nodetach) && use_syslog) { - fputs("The --syslog option is only valid with the --daemon option.\n", stderr); + fputs("The --syslog option is only valid when running detached.\n", stderr); return(-1); } diff --git a/report.c b/report.c index ee7d7594..7db42edc 100644 --- a/report.c +++ b/report.c @@ -170,7 +170,7 @@ error (status, errnum, message, va_alist) # endif priority = status? LOG_ALERT : errnum? LOG_ERR : LOG_INFO; - if (errnum) + if (errnum > 0) { char *msg = alloca (strlen (message) + 5); -- cgit v1.2.3