[dovecot-cvs] dovecot/src/lib-index mail-index-sync-ext.c, 1.23, 1.24

tss at dovecot.org tss at dovecot.org
Wed Mar 14 20:14:34 EET 2007


Update of /var/lib/cvs/dovecot/src/lib-index
In directory talvi:/tmp/cvs-serv16892

Modified Files:
	mail-index-sync-ext.c 
Log Message:
If new extension was introduced while we had already expunged some messages
in the sync, we cleared existing expunge/sync extension contexts, which
probably caused assert-crash.



Index: mail-index-sync-ext.c
===================================================================
RCS file: /var/lib/cvs/dovecot/src/lib-index/mail-index-sync-ext.c,v
retrieving revision 1.23
retrieving revision 1.24
diff -u -d -r1.23 -r1.24
--- mail-index-sync-ext.c	17 Jan 2007 14:57:11 -0000	1.23
+++ mail-index-sync-ext.c	14 Mar 2007 18:14:31 -0000	1.24
@@ -85,13 +85,13 @@
 	count = array_count(&ctx->view->index->extensions);
 	i_assert(count > 0);
 
-	if (array_is_created(&ctx->extra_contexts))
-		array_clear(&ctx->extra_contexts);
-	else
+	if (!array_is_created(&ctx->extra_contexts))
 		i_array_init(&ctx->extra_contexts, count);
 
-	/* fill the context array with NULLs */
+	/* make sure the extra_contexts contains everything */
 	(void)array_idx_modifiable(&ctx->extra_contexts, count - 1);
+	/* we need to update the expunge handler list in case they had
+	   already been called */
 	ctx->expunge_handlers_set = FALSE;
 }
 



More information about the dovecot-cvs mailing list