dovecot-2.0: mdbox: Fixed rebuilding map index that had duplicat...
dovecot at dovecot.org
dovecot at dovecot.org
Sat Mar 6 13:14:58 EET 2010
details: http://hg.dovecot.org/dovecot-2.0/rev/95f5ea024043
changeset: 10845:95f5ea024043
user: Timo Sirainen <tss at iki.fi>
date: Sat Mar 06 13:14:54 2010 +0200
description:
mdbox: Fixed rebuilding map index that had duplicate records.
diffstat:
src/lib-storage/index/dbox-multi/mdbox-storage-rebuild.c | 5 +++--
1 files changed, 3 insertions(+), 2 deletions(-)
diffs (15 lines):
diff -r 3bfb1e9f556b -r 95f5ea024043 src/lib-storage/index/dbox-multi/mdbox-storage-rebuild.c
--- a/src/lib-storage/index/dbox-multi/mdbox-storage-rebuild.c Sat Mar 06 13:11:07 2010 +0200
+++ b/src/lib-storage/index/dbox-multi/mdbox-storage-rebuild.c Sat Mar 06 13:14:54 2010 +0200
@@ -292,8 +292,9 @@
search_msg.offset = rec.rec.offset;
pos = bsearch(&search_msgp, msgs, count, sizeof(*msgs),
mdbox_rebuild_msg_offset_cmp);
- if (pos == NULL) {
- /* map record points to non-existing message. */
+ if (pos == NULL || (*pos)->map_uid != 0) {
+ /* map record points to non-existing or
+ a duplicate message. */
mail_index_expunge(ctx->trans, seq);
} else {
(*pos)->map_uid = rec.map_uid;
More information about the dovecot-cvs
mailing list