dovecot-1.2: Thread index bugfix.
dovecot at dovecot.org
dovecot at dovecot.org
Mon Sep 1 15:30:44 EEST 2008
details: http://hg.dovecot.org/dovecot-1.2/rev/b7e097200892
changeset: 8147:b7e097200892
user: Timo Sirainen <tss at iki.fi>
date: Mon Sep 01 15:30:40 2008 +0300
description:
Thread index bugfix.
diffstat:
1 file changed, 9 insertions(+), 1 deletion(-)
src/lib-storage/index/index-thread.c | 10 +++++++++-
diffs (20 lines):
diff -r 70b53e9b232e -r b7e097200892 src/lib-storage/index/index-thread.c
--- a/src/lib-storage/index/index-thread.c Mon Sep 01 15:17:00 2008 +0300
+++ b/src/lib-storage/index/index-thread.c Mon Sep 01 15:30:40 2008 +0300
@@ -432,7 +432,15 @@ static void mail_thread_cache_update_add
should already be in msgid_map. */
msgid_map = array_get(tbox->msgid_map, &map_count);
uids = array_get(added_uids, &uid_count);
- i_assert(uid_count == 0 || msgid_map[j].uid <= uids[0].seq1);
+ if (uid_count == 0)
+ return;
+
+ (void)bsearch_insert_pos(&uids[0].seq1, msgid_map, map_count,
+ sizeof(*msgid_map), msgid_map_cmp, &j);
+ i_assert(j < map_count);
+ while (j > 0 && msgid_map[j-1].uid == msgid_map[j].uid)
+ j--;
+
for (i = 0; i < uid_count; i++) {
for (uid = uids[i].seq1; uid <= uids[i].seq2; uid++) {
while (j < map_count && msgid_map[j].uid < uid)
More information about the dovecot-cvs
mailing list