From: Timo Sirainen Date: Sat, 19 Jun 2004 17:14:18 +0000 (+0300) Subject: New mails pointed to beginning of file. X-Git-Tag: 1.1.alpha1~3937 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=99be58a447b69d62cbd9e764000a06226b9c9c89;p=thirdparty%2Fdovecot%2Fcore.git New mails pointed to beginning of file. --HG-- branch : HEAD --- diff --git a/src/lib-storage/index/mbox/mbox-sync.c b/src/lib-storage/index/mbox/mbox-sync.c index d1e49acb1c..626ba8b9fe 100644 --- a/src/lib-storage/index/mbox/mbox-sync.c +++ b/src/lib-storage/index/mbox/mbox-sync.c @@ -466,8 +466,10 @@ update_from_offsets(struct index_mailbox *ibox, const struct mbox_sync_mail *mails; uint32_t extra_idx = ibox->mbox_extra_idx; uint64_t offset; + size_t size; - mails = buffer_get_modifyable_data(mails_buf, NULL); + mails = buffer_get_modifyable_data(mails_buf, &size); + i_assert((seq2-seq1+1) * sizeof(*mails) == size); for (; seq1 <= seq2; seq1++, mails++) { if (mails->uid != 0) { @@ -820,13 +822,12 @@ static int mbox_sync_handle_eof_updates(struct mbox_sync_context *sync_ctx, sync_ctx->need_space_seq, sync_ctx->seq) < 0) return -1; - - update_from_offsets(sync_ctx->ibox, sync_ctx->t, - sync_ctx->mails, - sync_ctx->need_space_seq, - sync_ctx->seq); } + update_from_offsets(sync_ctx->ibox, sync_ctx->t, + sync_ctx->mails, + sync_ctx->need_space_seq, sync_ctx->seq); + sync_ctx->need_space_seq = 0; buffer_set_used_size(sync_ctx->mails, 0); }