Mercurial > dovecot > original-hg > dovecot-1.2
changeset 2803:bbfb6a094bb1 HEAD
Crashfix
author | Timo Sirainen <tss@iki.fi> |
---|---|
date | Thu, 21 Oct 2004 20:16:32 +0300 |
parents | bdfccd54a077 |
children | c686e724aba6 |
files | src/lib-index/mail-index-view-sync.c |
diffstat | 1 files changed, 5 insertions(+), 7 deletions(-) [+] |
line wrap: on
line diff
--- a/src/lib-index/mail-index-view-sync.c Thu Oct 21 16:41:36 2004 +0300 +++ b/src/lib-index/mail-index-view-sync.c Thu Oct 21 20:16:32 2004 +0300 @@ -10,6 +10,7 @@ struct mail_index_view_sync_ctx { struct mail_index_view *view; enum mail_transaction_type trans_sync_mask; + struct mail_index_sync_map_ctx sync_map_ctx; buffer_t *expunges; const struct mail_transaction_header *hdr; @@ -122,6 +123,9 @@ ctx->trans_sync_mask = want_mask; ctx->expunges = expunges; + ctx->sync_map_ctx.view = view; + ctx->sync_map_ctx.last_ext_id = (uint32_t)-1; + if ((sync_mask & MAIL_INDEX_SYNC_TYPE_EXPUNGE) != 0) { view->new_map = view->index->map; view->new_map->refcount++; @@ -202,13 +206,7 @@ see only updated information. */ if (ctx->sync_map_update && (ctx->hdr->type & MAIL_TRANSACTION_EXPUNGE) == 0) { - struct mail_index_sync_map_ctx sync_map_ctx; - - memset(&sync_map_ctx, 0, sizeof(sync_map_ctx)); - sync_map_ctx.view = view; - sync_map_ctx.last_ext_id = (uint32_t)-1; - - if (mail_index_sync_record(&sync_map_ctx, ctx->hdr, + if (mail_index_sync_record(&ctx->sync_map_ctx, ctx->hdr, ctx->data) < 0) return -1; }