]> git.ipfire.org Git - thirdparty/dovecot/core.git/commitdiff
QRESYNC: Fixed fallback handling to fetching expunged UIDs (again).
authorTimo Sirainen <tss@iki.fi>
Tue, 20 Oct 2009 19:40:51 +0000 (15:40 -0400)
committerTimo Sirainen <tss@iki.fi>
Tue, 20 Oct 2009 19:40:51 +0000 (15:40 -0400)
--HG--
branch : HEAD

src/imap/imap-fetch.c

index 71548b0c2062191b160576bb6ac6df48401d9ee8..cc4c8c9591f2823e50eaae3c77a32c46b5beec0d 100644 (file)
@@ -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) {