aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--NEWS4
-rw-r--r--imap.c27
2 files changed, 20 insertions, 11 deletions
diff --git a/NEWS b/NEWS
index 702f76a5..d0f1d007 100644
--- a/NEWS
+++ b/NEWS
@@ -50,9 +50,11 @@ fetchmail 6.3.3 (not yet released):
Lynch.
* ./configure --quiet is now quieter (no SSL and fallback-related output).
* fix bug in LMTP port validation (patch by Miloslav Trmac).
-* Miloslav Trmac's patch (with minor changes) to fix char * sign consistency.
+* Miloslav Trmac's patch (with minor changes) to fix char * sign consistency,
+ unused arguments and variables.
* Warn and disable SDPS if POP3 is disabled to avoid compilation errors.
* More signedness, unused argument/variable and other warning fixes.
+* Stop sending EXPUNGE after NOOP-idling (patch by Sunil Shetye).
# CHANGES:
* --idle can now be specified on the command line, too.
diff --git a/imap.c b/imap.c
index a877a590..42f57281 100644
--- a/imap.c
+++ b/imap.c
@@ -736,16 +736,6 @@ static int imap_getrange(int sock,
"%d messages waiting after first poll\n",
count), count);
- /* no messages? then we may need to idle until we get some */
- while (count == 0 && do_idle) {
- ok = imap_idle(sock);
- if (ok)
- {
- report(stderr, GT_("re-poll failed\n"));
- return(ok);
- }
- }
-
/*
* We should have an expunge here to
* a) avoid fetching deleted mails during 'fetchall'
@@ -764,6 +754,23 @@ static int imap_getrange(int sock,
"%d messages waiting after expunge\n",
count), count);
}
+
+ if (count == 0 && do_idle)
+ {
+ /* no messages? then we may need to idle until we get some */
+ while (count == 0) {
+ ok = imap_idle(sock);
+ if (ok)
+ {
+ report(stderr, GT_("re-poll failed\n"));
+ return(ok);
+ }
+ }
+ if (outlevel >= O_DEBUG)
+ report(stdout, ngettext("%d message waiting after re-poll\n",
+ "%d messages waiting after re-poll\n",
+ count), count);
+ }
}
*countp = count;