From: Timo Sirainen Date: Tue, 20 Oct 2009 19:40:51 +0000 (-0400) Subject: QRESYNC: Fixed fallback handling to fetching expunged UIDs (again). X-Git-Tag: 2.0.alpha2~58 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=cdc5c81463995a153c57c68c299e98cc3de0b287;p=thirdparty%2Fdovecot%2Fcore.git QRESYNC: Fixed fallback handling to fetching expunged UIDs (again). --HG-- branch : HEAD --- diff --git a/src/imap/imap-fetch.c b/src/imap/imap-fetch.c index 71548b0c20..cc4c8c9591 100644 --- a/src/imap/imap-fetch.c +++ b/src/imap/imap-fetch.c @@ -223,10 +223,12 @@ static int get_expunges_fallback(struct imap_fetch_context *ctx, next_uid, mail->uid - 1); } - if (uid_filter[i].seq2 == mail->uid) - next_uid = uid_filter[++i].seq1; - else + if (uid_filter[i].seq2 != mail->uid) next_uid = mail->uid + 1; + else if (++i < count) + next_uid = uid_filter[i].seq1; + else + break; } } if (i < count) {