dovecot-2.0-sslstream: lib-index: Ignore modseq->1 updates, they...

dovecot at dovecot.org dovecot at dovecot.org
Sat Feb 13 02:56:23 EET 2010


details:   http://hg.dovecot.org/dovecot-2.0-sslstream/rev/2a2261f5a0be
changeset: 10322:2a2261f5a0be
user:      Timo Sirainen <tss at iki.fi>
date:      Fri Nov 13 16:53:14 2009 -0500
description:
lib-index: Ignore modseq->1 updates, they can never happen.

diffstat:

1 file changed, 10 insertions(+)
src/lib-index/mail-index-transaction-update.c |   10 ++++++++++

diffs (27 lines):

diff -r 4933856b86d7 -r 2a2261f5a0be src/lib-index/mail-index-transaction-update.c
--- a/src/lib-index/mail-index-transaction-update.c	Thu Nov 12 18:51:08 2009 -0500
+++ b/src/lib-index/mail-index-transaction-update.c	Fri Nov 13 16:53:14 2009 -0500
@@ -258,6 +258,11 @@ void mail_index_update_modseq(struct mai
 {
 	struct mail_transaction_modseq_update *u;
 
+	/* modseq=1 is the minimum always and it's only for mails that were
+	   created/modified before modseqs were enabled. */
+	if (min_modseq <= 1)
+		return;
+
 	if (!array_is_created(&t->modseq_updates))
 		i_array_init(&t->modseq_updates, 32);
 
@@ -272,6 +277,11 @@ void mail_index_update_highest_modseq(st
 void mail_index_update_highest_modseq(struct mail_index_transaction *t,
 				      uint64_t min_modseq)
 {
+	/* modseq=1 is the minimum always and it's only for mails that were
+	   created/modified before modseqs were enabled. */
+	if (min_modseq <= 1)
+		return;
+
 	if (t->min_highest_modseq < min_modseq)
 		t->min_highest_modseq = min_modseq;
 


More information about the dovecot-cvs mailing list