fetchmail-friends
[Top] [All Lists]

Re: [fetchmail]6.0.0 release is imminent

2002-06-23 04:54:11
It came down to whitespace. I use Samba plus Windows-based editor and email
and this combination appeared to mangel tabs and trailing spaces. Here is my
new patch, tested and all. Inline and attached (sorry to those who read
digests). Sorry for my inexperience. And thanks to quite a few on the list
for the appreciation for the purpose of this patch.

This is my patch output:

# patch driver.cpatching file driver.c driver.diff
Hunk #1 succeeded at 420 with fuzz 2.

In fact I think I have two hunks, but the resulting file seems fine so I
leave it at that.

Good luck, Jan.

--- driver.c Sun Jun 23 12:36:40 2002
+++ driver.c.jan Sun Jun 23 12:28:21 2002
@@ -420,7 +420,17 @@
  {
      if ((msgcodes[num-1] == MSGLEN_TOOLARGE) && !check_only)
   mark_oversized(ctl, num, msgsizes[num-1]);
-     if (outlevel > O_SILENT)
+    /* To avoid flooding the syslog when using --keep,
+     * report "Skipped message" only when:
+     *  1) --verbose is on, or
+   *  2) fetchmail runs in foreground
+     *  3) fetchmail does not use syslog and
+     *  4) the message was not skipped for some other reason than just
being old.
+     *  (jan(_at_)klaverstijn(_dot_)nl)
+     */
+     if (   (outlevel >= O_VERBOSE) || !run.poll_interval ||
+            (outlevel > O_SILENT && (!run.use_syslog || msgcodes[num-1] !=
MSGLEN_OLD))
+        )
      {
   report_build(stdout,
         GT_("skipping message %s(_at_)%s:%d (%d octets)"),
@@ -684,8 +694,18 @@
      delete_str(&ctl->newsaved, num);
 #endif /* POP3_ENABLE */
  }
- else if (outlevel > O_SILENT)
-     report_complete(stdout, GT_(" not flushed\n"));
+ else if (
+    /* To avoid flooding the syslog when using --keep,
+     * report "Skipped message" only when:
+     *  1) --verbose is on, or
+   *  2) fetchmail runs in foreground
+     *  3) fetchmail does not use syslog and
+     *  4) the message was not skipped for some other reason than just
being old.
+     *  (jan(_at_)klaverstijn(_dot_)nl)
+     */
+   (outlevel >= O_VERBOSE) || !run.poll_interval ||
+            (outlevel > O_SILENT && (!run.use_syslog || msgcodes[num-1] !=
MSGLEN_OLD))
+        )     report_complete(stdout, GT_(" not flushed\n"));

  /* perhaps this as many as we're ready to handle */
  if (maxfetch && maxfetch <= *fetches && *fetches < count)

----- Original Message -----
From: "Eric S. Raymond" <esr(_at_)thyrsus(_dot_)com>
To: "Jan Klaverstijn" <jan(_at_)klaverstijn(_dot_)nl>
Cc: <fetchmail-friends(_at_)lists(_dot_)ccil(_dot_)org>
Sent: Saturday, June 22, 2002 10:53 PM
Subject: Re: [fetchmail]6.0.0 release is imminent


Jan Klaverstijn <jan(_at_)klaverstijn(_dot_)nl>:
This is my patch against 5.9.12. It reduces the amount of information
sent
to the syslog by suppressing the message that tells a mail was skipped
because it was fetched before and the keep option is in effect.

This patch didn't apply. Both bands failed.
--
<a href="http://www.tuxedo.org/~esr/";>Eric S. Raymond</a>

Attachment: driver.diff
Description: Binary data