[dovecot-cvs] dovecot/src/plugins/fts-squat squat-uidlist.c, 1.8, 1.9

tss at dovecot.org tss at dovecot.org
Wed Dec 20 13:59:18 UTC 2006


Update of /var/lib/cvs/dovecot/src/plugins/fts-squat
In directory talvi:/tmp/cvs-serv20057

Modified Files:
	squat-uidlist.c 
Log Message:
Actually the code wasn't unneeded, put it back and actually execute it now.



Index: squat-uidlist.c
===================================================================
RCS file: /var/lib/cvs/dovecot/src/plugins/fts-squat/squat-uidlist.c,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -d -r1.8 -r1.9
--- squat-uidlist.c	20 Dec 2006 13:56:48 -0000	1.8
+++ squat-uidlist.c	20 Dec 2006 13:59:16 -0000	1.9
@@ -1047,13 +1047,23 @@
 			 ARRAY_TYPE(seq_range) *result)
 {
 	struct squat_uidlist_get_context ctx;
+	const struct seq_range *range;
+	unsigned int count;
 
 	memset(&ctx, 0, sizeof(ctx));
 	ctx.uidlist = uidlist;
 	ctx.result = result;
 	ctx.filter_pos = 1;
 
-	return squat_uidlist_get_ctx(&ctx, uid_list_idx);
+	if (squat_uidlist_get_ctx(&ctx, uid_list_idx) < 0)
+		return -1;
+
+	range = array_get(ctx.result, &count);
+	if (count > 0) {
+		for (; ctx.filter_pos <= range[count-1].seq2; ctx.filter_pos++)
+			seq_range_array_remove(result, ctx.filter_pos);
+	}
+	return 0;
 }
 
 bool squat_uidlist_want_flush(struct squat_uidlist *uidlist)



More information about the dovecot-cvs mailing list