dovecot-2.1: imapc: Fixed expunging too many messages from index.

dovecot at dovecot.org dovecot at dovecot.org
Sun Oct 9 18:56:12 EEST 2011


details:   http://hg.dovecot.org/dovecot-2.1/rev/d8ba3f6d1b9d
changeset: 13625:d8ba3f6d1b9d
user:      Timo Sirainen <tss at iki.fi>
date:      Sun Oct 09 19:04:15 2011 +0300
description:
imapc: Fixed expunging too many messages from index.

diffstat:

 src/lib-storage/index/imapc/imapc-mailbox.c |  4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)

diffs (24 lines):

diff -r 2ecf19d88f8e -r d8ba3f6d1b9d src/lib-storage/index/imapc/imapc-mailbox.c
--- a/src/lib-storage/index/imapc/imapc-mailbox.c	Sun Oct 09 18:27:54 2011 +0300
+++ b/src/lib-storage/index/imapc/imapc-mailbox.c	Sun Oct 09 19:04:15 2011 +0300
@@ -312,10 +312,11 @@
 		if (!mail_index_lookup_seq(mbox->delayed_sync_view,
 					   uid, &lseq)) {
 			/* already expunged by another session */
+			if (rseq == mbox->sync_next_rseq)
+				mbox->sync_next_rseq++;
 			return;
 		}
 	}
-	rec = mail_index_lookup(mbox->delayed_sync_view, lseq);
 
 	if (rseq == mbox->sync_next_rseq) {
 		/* we're doing the initial full sync of mails. expunge any
@@ -332,6 +333,7 @@
 		mbox->sync_next_lseq++;
 	}
 
+	rec = mail_index_lookup(mbox->delayed_sync_view, lseq);
 	if (seen_flags && rec->flags != flags) {
 		mail_index_update_flags(mbox->delayed_sync_trans, lseq,
 					MODIFY_REPLACE, flags);


More information about the dovecot-cvs mailing list