aboutsummaryrefslogtreecommitdiffstats
path: root/imap.c
diff options
context:
space:
mode:
authorMatthias Andree <matthias.andree@gmx.de>2006-03-14 12:27:24 +0000
committerMatthias Andree <matthias.andree@gmx.de>2006-03-14 12:27:24 +0000
commit5d8baab700b5ea100ccc93495071605e094bd84e (patch)
treedf3f8939f205081cffcb2512ed5a520d43633693 /imap.c
parenta6e5a2676e356b574a0cf0efb065a477daf7730b (diff)
downloadfetchmail-5d8baab700b5ea100ccc93495071605e094bd84e.tar.gz
fetchmail-5d8baab700b5ea100ccc93495071605e094bd84e.tar.bz2
fetchmail-5d8baab700b5ea100ccc93495071605e094bd84e.zip
Do not send EXPUNGE after NOOP-idling (Sunil Shetye's patch, fetchmail-users@).
svn path=/branches/BRANCH_6-3/; revision=4739
Diffstat (limited to 'imap.c')
-rw-r--r--imap.c27
1 files changed, 17 insertions, 10 deletions
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;