dovecot: Squat fixes

dovecot at dovecot.org dovecot at dovecot.org
Sat Feb 9 14:34:34 EET 2008


details:   http://hg.dovecot.org/dovecot/rev/6c48b72c5096
changeset: 7219:6c48b72c5096
user:      Timo Sirainen <tss at iki.fi>
date:      Sat Feb 09 14:34:30 2008 +0200
description:
Squat fixes

diffstat:

1 file changed, 5 insertions(+), 5 deletions(-)
src/plugins/fts-squat/squat-trie.c |   10 +++++-----

diffs (42 lines):

diff -r 43d2f70fb279 -r 6c48b72c5096 src/plugins/fts-squat/squat-trie.c
--- a/src/plugins/fts-squat/squat-trie.c	Sat Feb 09 13:53:54 2008 +0200
+++ b/src/plugins/fts-squat/squat-trie.c	Sat Feb 09 14:34:30 2008 +0200
@@ -1082,7 +1082,7 @@ squat_trie_iterate_next(struct squat_tri
 	ctx->cur.idx = 0;
 	if (shift_count != 0)
 		i_array_init(&ctx->cur.shifts, shift_count);
-	return ctx->cur.node;
+	return squat_trie_iterate_first(ctx);
 }
 
 static void
@@ -1097,7 +1097,6 @@ squat_uidlist_update_expunged_uids(const
 	uint32_t child_shift_seq1, child_shift_count, seq_high;
 	unsigned int shift_sum = 0, child_sum = 0;
 
-	/* self shift */
 	uids = array_get_modifiable(uids_arr, &uid_count);
 	shifts = array_get(shifts_arr, &shift_count);
 	for (i = 0, uid_idx = 0, seq_high = 0;; ) {
@@ -1123,9 +1122,11 @@ squat_uidlist_update_expunged_uids(const
 				uid_idx++;
 			}
 		}
-		if (uid_idx == uid_count)
+		if (uid_idx == uid_count) {
+			i_assert(array_count(child_shifts) > 0 ||
+				 array_count(uids_arr) == 0);
 			break;
-
+		}
 		shift.seq1 = I_MAX(shifts[i].seq1, seq_high);
 		shift.seq2 = shifts[i].seq2;
 		if (shift.seq2 < uids[uid_idx].seq1) {
@@ -1274,7 +1275,6 @@ squat_trie_renumber_uidlists(struct squa
 	time_t now;
 	int ret = 0;
 
-	/* FIXME: update indexid */
 	if ((ret = squat_uidlist_rebuild_init(ctx->uidlist_build_ctx,
 					      compress, &rebuild_ctx)) <= 0)
 		return ret;


More information about the dovecot-cvs mailing list