Mercurial > dovecot > original-hg > dovecot-1.2
changeset 2924:0e6ecb9d06e0 HEAD
broken fix for sync handler deinitializing..
author | Timo Sirainen <tss@iki.fi> |
---|---|
date | Tue, 30 Nov 2004 11:37:33 +0200 |
parents | 52000679a7aa |
children | f7e3283137db |
files | src/lib-index/mail-index-sync-update.c |
diffstat | 1 files changed, 8 insertions(+), 6 deletions(-) [+] |
line wrap: on
line diff
--- a/src/lib-index/mail-index-sync-update.c Tue Nov 30 11:20:25 2004 +0200 +++ b/src/lib-index/mail-index-sync-update.c Tue Nov 30 11:37:33 2004 +0200 @@ -122,18 +122,20 @@ { const struct mail_index_sync_handler *sync_handlers; const struct mail_index_ext *ext; - size_t i, size; + size_t i, synch_size, size; if (ctx->extra_context == NULL) return; - sync_handlers = buffer_get_data(ctx->view->index->sync_handlers, &size); - size /= sizeof(*sync_handlers); + sync_handlers = buffer_get_data(ctx->view->index->sync_handlers, + &synch_size); + synch_size /= sizeof(*sync_handlers); - i_assert(size <= ctx->extra_context_buf->used / sizeof(void *)); + i_assert(synch_size <= ctx->extra_context_buf->used / sizeof(void *)); - ext = ctx->view->map->extensions->data; - i_assert(ctx->view->map->extensions->used / sizeof(*ext) == size); + ext = buffer_get_data(ctx->view->map->extensions, &size); + size /= sizeof(*ext); + i_assert(size <= synch_size); /* sync_handlers[] is ordered by index->extensions while extra_context is ordered by map->extensions. */