dovecot-2.2: lib-index: Fixed modseq updates when modseq was ove...

dovecot at dovecot.org dovecot at dovecot.org
Wed Sep 4 22:16:09 EEST 2013


details:   http://hg.dovecot.org/dovecot-2.2/rev/4d297ab881ef
changeset: 16709:4d297ab881ef
user:      Timo Sirainen <tss at iki.fi>
date:      Wed Sep 04 22:16:02 2013 +0300
description:
lib-index: Fixed modseq updates when modseq was over 32bits long

diffstat:

 src/lib-index/mail-index-sync-update.c    |  2 +-
 src/lib-index/mail-transaction-log-file.c |  2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diffs (24 lines):

diff -r 39972f75b143 -r 4d297ab881ef src/lib-index/mail-index-sync-update.c
--- a/src/lib-index/mail-index-sync-update.c	Wed Sep 04 22:13:01 2013 +0300
+++ b/src/lib-index/mail-index-sync-update.c	Wed Sep 04 22:16:02 2013 +0300
@@ -322,7 +322,7 @@
 		else if (!mail_index_lookup_seq(view, u->uid, &seq))
 			continue;
 
-		min_modseq = ((uint64_t)u->modseq_high32 >> 32) |
+		min_modseq = ((uint64_t)u->modseq_high32 << 32) |
 			u->modseq_low32;
 		if (highest_modseq < min_modseq)
 			highest_modseq = min_modseq;
diff -r 39972f75b143 -r 4d297ab881ef src/lib-index/mail-transaction-log-file.c
--- a/src/lib-index/mail-transaction-log-file.c	Wed Sep 04 22:13:01 2013 +0300
+++ b/src/lib-index/mail-transaction-log-file.c	Wed Sep 04 22:16:02 2013 +0300
@@ -1031,7 +1031,7 @@
 
 		end = CONST_PTR_OFFSET(data, trans_size - sizeof(*hdr));
 		for (rec = data; rec < end; rec++) {
-			uint64_t modseq = ((uint64_t)rec->modseq_high32 >> 32) |
+			uint64_t modseq = ((uint64_t)rec->modseq_high32 << 32) |
 				rec->modseq_low32;
 			if (*cur_modseq < modseq)
 				*cur_modseq = modseq;


More information about the dovecot-cvs mailing list