[dovecot-cvs] dovecot/src/lib-storage/index/maildir maildir-sync.c, 1.77.2.5, 1.77.2.6

tss at dovecot.org tss at dovecot.org
Tue Mar 6 22:36:44 EET 2007


Update of /var/lib/cvs/dovecot/src/lib-storage/index/maildir
In directory talvi:/tmp/cvs-serv19471

Modified Files:
      Tag: branch_1_0
	maildir-sync.c 
Log Message:
Added assert.



Index: maildir-sync.c
===================================================================
RCS file: /var/lib/cvs/dovecot/src/lib-storage/index/maildir/maildir-sync.c,v
retrieving revision 1.77.2.5
retrieving revision 1.77.2.6
diff -u -d -r1.77.2.5 -r1.77.2.6
--- maildir-sync.c	6 Mar 2007 15:39:01 -0000	1.77.2.5
+++ maildir-sync.c	6 Mar 2007 20:36:42 -0000	1.77.2.6
@@ -968,7 +968,7 @@
 	struct mail_index_transaction *trans;
 	const struct mail_index_header *hdr;
 	const struct mail_index_record *rec;
-	uint32_t seq, uid;
+	uint32_t seq, uid, prev_uid;
         enum maildir_uidlist_rec_flag uflags;
 	const char *filename;
 	enum mail_flags flags;
@@ -999,7 +999,7 @@
 	sync_ctx->trans = trans =
 		mail_index_transaction_begin(sync_ctx->view, FALSE, TRUE);
 
-	seq = 0;
+	seq = prev_uid = 0;
 	ARRAY_CREATE(&keywords, pool_datastack_create(),
 		     unsigned int, MAILDIR_MAX_KEYWORDS);
 	ARRAY_CREATE(&idx_keywords, pool_datastack_create(),
@@ -1009,6 +1009,9 @@
 		maildir_filename_get_flags(sync_ctx->keywords_sync_ctx,
 					   filename, &flags, &keywords);
 
+		i_assert(uid > prev_uid);
+		prev_uid = uid;
+
 		/* the private flags are kept only in indexes. don't use them
 		   at all even for newly seen mails */
 		flags &= ~mbox->private_flags_mask;



More information about the dovecot-cvs mailing list