diff options
author | Matthias Andree <matthias.andree@gmx.de> | 2006-03-14 12:27:24 +0000 |
---|---|---|
committer | Matthias Andree <matthias.andree@gmx.de> | 2006-03-14 12:27:24 +0000 |
commit | 5d8baab700b5ea100ccc93495071605e094bd84e (patch) | |
tree | df3f8939f205081cffcb2512ed5a520d43633693 /imap.c | |
parent | a6e5a2676e356b574a0cf0efb065a477daf7730b (diff) | |
download | fetchmail-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.c | 27 |
1 files changed, 17 insertions, 10 deletions
@@ -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; |