dovecot-1.1: DEBUG: Verify that UIDs are ascending after sync.

dovecot at dovecot.org dovecot at dovecot.org
Sat Mar 15 07:32:39 EET 2008


details:   http://hg.dovecot.org/dovecot-1.1/rev/a4a552321bd3
changeset: 7420:a4a552321bd3
user:      Timo Sirainen <tss at iki.fi>
date:      Sat Mar 15 07:31:44 2008 +0200
description:
DEBUG: Verify that UIDs are ascending after sync.

diffstat:

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

diffs (19 lines):

diff -r fc526477d36b -r a4a552321bd3 src/lib-index/mail-index-sync-update.c
--- a/src/lib-index/mail-index-sync-update.c	Sat Mar 15 06:58:19 2008 +0200
+++ b/src/lib-index/mail-index-sync-update.c	Sat Mar 15 07:31:44 2008 +0200
@@ -673,12 +673,15 @@ void mail_index_map_check(struct mail_in
 {
 	const struct mail_index_header *hdr = &map->hdr;
 	unsigned int i, del = 0, seen = 0;
+	uint32_t prev_uid = 0;
 
 	i_assert(hdr->messages_count <= map->rec_map->records_count);
 	for (i = 0; i < hdr->messages_count; i++) {
 		const struct mail_index_record *rec;
 
 		rec = MAIL_INDEX_MAP_IDX(map, i);
+		i_assert(rec->uid > prev_uid);
+		prev_uid = rec->uid;
 
 		if (rec->flags & MAIL_DELETED) {
 			i_assert(rec->uid >= hdr->first_deleted_uid_lowwater);


More information about the dovecot-cvs mailing list