static int cleanupSockClose (int fd)
/* close sockets in maximum CLEANUP_TIMEOUT seconds during cleanup */
{
- int scerror;
- SIGHANDLERTYPE alrmsave;
- alrmsave = set_signal_handler(SIGALRM, null_signal_handler);
- set_timeout(CLEANUP_TIMEOUT);
- scerror = SockClose(fd);
- set_timeout(0);
- set_signal_handler(SIGALRM, alrmsave);
- return (scerror);
+ (void)SockTimeout(fd, CLEANUP_TIMEOUT); /* ignore errors */
+ return SockClose(fd);
}
#ifdef KERBEROS_V5
}
if (msgcode == MSGLEN_OLD)
{
- /* To avoid flooding the syslog when using --keep,
- * report "Skipped message" only when:
- * 1) --verbose is on, or
- * 2) fetchmail does not use syslog
- */
- if ( (outlevel >= O_VERBOSE) ||
- (outlevel > O_SILENT && !run.use_syslog)
- )
+ /*
+ * To avoid flooding the logs when using --keep, report
+ * skipping for old messages only when --flush is on.
+ */
+ if (outlevel > O_SILENT && ctl->flush)
{
report_build(stdout,
GT_("skipping message %s@%s:%d"),
}
else
{
- if ( (outlevel >= O_VERBOSE) ||
- /* To avoid flooding the syslog when using --keep,
- * report "Skipped message" only when:
- * 1) --verbose is on, or
- * 2) fetchmail does not use syslog, or
- * 3) the message was skipped for some other
- * reason than just being old.
- */
- (outlevel > O_SILENT && (!run.use_syslog || msgcode != MSGLEN_OLD))
- )
+ /*
+ * To avoid flooding the logs when using --keep, report
+ * skipping of new messages only.
+ */
+ if (outlevel > O_SILENT && msgcode != MSGLEN_OLD)
report_complete(stdout, GT_(" not flushed\n"));
/* maybe we mark this message as seen now? */