changeset 16709:4d297ab881ef

lib-index: Fixed modseq updates when modseq was over 32bits long
author Timo Sirainen <tss@iki.fi>
date Wed, 04 Sep 2013 22:16:02 +0300
parents 39972f75b143
children 3091883c672a
files src/lib-index/mail-index-sync-update.c src/lib-index/mail-transaction-log-file.c
diffstat 2 files changed, 2 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- 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;
--- 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;