dovecot-2.1: imapc: Fixed updating message flags from another se...

dovecot at dovecot.org dovecot at dovecot.org
Sat Oct 8 20:23:12 EEST 2011


details:   http://hg.dovecot.org/dovecot-2.1/rev/7e0bdfa76f12
changeset: 13620:7e0bdfa76f12
user:      Timo Sirainen <tss at iki.fi>
date:      Sat Oct 08 20:31:22 2011 +0300
description:
imapc: Fixed updating message flags from another session.

diffstat:

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

diffs (30 lines):

diff -r 92dd30cf0d22 -r 7e0bdfa76f12 src/lib-storage/index/imapc/imapc-mailbox.c
--- a/src/lib-storage/index/imapc/imapc-mailbox.c	Fri Oct 07 21:15:52 2011 +0300
+++ b/src/lib-storage/index/imapc/imapc-mailbox.c	Sat Oct 08 20:31:22 2011 +0300
@@ -212,6 +212,7 @@
 				fetch_uid, uid);
 			return -1;
 		}
+		*uid_r = uid;
 	} else if (fetch_uid == 0 || rseq != msg_count+1) {
 		/* probably a flag update for a message we haven't yet
 		   received our initial UID FETCH for. we should get
@@ -322,8 +323,8 @@
 			/* already expunged by another session */
 			return;
 		}
-		rec = mail_index_lookup(mbox->delayed_sync_view, lseq);
 	}
+	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
@@ -340,7 +341,7 @@
 		mbox->sync_next_lseq++;
 	}
 
-	if (seen_flags && (rec == NULL || rec->flags != flags)) {
+	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