[dovecot-cvs] dovecot/src/lib-index mail-index-sync-ext.c, 1.16.2.3, 1.16.2.4
tss at dovecot.org
tss at dovecot.org
Wed Mar 14 20:14:31 EET 2007
Update of /var/lib/cvs/dovecot/src/lib-index
In directory talvi:/tmp/cvs-serv16884
Modified Files:
Tag: branch_1_0
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.16.2.3
retrieving revision 1.16.2.4
diff -u -d -r1.16.2.3 -r1.16.2.4
--- mail-index-sync-ext.c 17 Jan 2007 14:57:08 -0000 1.16.2.3
+++ mail-index-sync-ext.c 14 Mar 2007 18:14:29 -0000 1.16.2.4
@@ -83,15 +83,15 @@
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)) {
ARRAY_CREATE(&ctx->extra_contexts, default_pool,
void *, count);
}
- /* fill the context array with NULLs */
+ /* make sure the extra_contexts contains everything */
(void)array_idx_modifyable(&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