diff options
author | Eric S. Raymond <esr@thyrsus.com> | 1997-10-05 01:49:26 +0000 |
---|---|---|
committer | Eric S. Raymond <esr@thyrsus.com> | 1997-10-05 01:49:26 +0000 |
commit | e89387bfee912d747b31d3a57d96891e8bedac0a (patch) | |
tree | f17913bc5897cac48b7c6f219b7110a832e2bab0 /imap.c | |
parent | 313a954360f1659a3a27e1b02c8de7d2aaf99e15 (diff) | |
download | fetchmail-e89387bfee912d747b31d3a57d96891e8bedac0a.tar.gz fetchmail-e89387bfee912d747b31d3a57d96891e8bedac0a.tar.bz2 fetchmail-e89387bfee912d747b31d3a57d96891e8bedac0a.zip |
Fix the Kooijman bug.
svn path=/trunk/; revision=1478
Diffstat (limited to 'imap.c')
-rw-r--r-- | imap.c | 16 |
1 files changed, 10 insertions, 6 deletions
@@ -408,8 +408,14 @@ static int imap_getrange(int sock, if (pass > 1) { - ok = gen_transact(sock, "NOOP"); - if (ok != 0) + /* + * We have to have an expunge here, otherwise the re-poll will + * infinite-loop picking up un-expunged message. + */ + ok = 0; + if (deletions && ctl->expunge > 1) + ok = gen_transact(sock, "EXPUNGE"); + if (ok || gen_transact(sock, "NOOP")) { error(0, 0, "re-poll failed"); return(ok); @@ -625,7 +631,7 @@ static int imap_delete(int sock, struct query *ctl, int number) if ((ok = gen_transact(sock, "EXPUNGE"))) return(ok); - expunged = deletions;; + expunged = deletions; } return(PS_SUCCESS); @@ -634,10 +640,8 @@ static int imap_delete(int sock, struct query *ctl, int number) static int imap_logout(int sock, struct query *ctl) /* send logout command */ { - - /* if expunges after deletion have been suppressed, ship one now */ - if (ctl->expunge <= 0 && deletions) + if (ctl->expunge == 0 && deletions) { int ok; |