[dovecot-cvs] dovecot/src/lib-storage/index/maildir maildir-sync.c, 1.89, 1.90

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


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

Modified Files:
	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.89
retrieving revision 1.90
diff -u -d -r1.89 -r1.90
--- maildir-sync.c	6 Mar 2007 15:39:04 -0000	1.89
+++ maildir-sync.c	6 Mar 2007 20:36:45 -0000	1.90
@@ -991,7 +991,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;
@@ -1021,7 +1021,7 @@
 	sync_ctx->trans = trans =
 		mail_index_transaction_begin(sync_ctx->view, FALSE, TRUE);
 
-	seq = 0;
+	seq = prev_uid = 0;
 	t_array_init(&keywords, MAILDIR_MAX_KEYWORDS);
 	t_array_init(&idx_keywords, MAILDIR_MAX_KEYWORDS);
 	iter = maildir_uidlist_iter_init(mbox->uidlist);
@@ -1029,6 +1029,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