Mercurial > dovecot > original-hg > dovecot-1.2
changeset 2142:535227d3e4b0 HEAD
crashfix in error case
author | Timo Sirainen <tss@iki.fi> |
---|---|
date | Wed, 16 Jun 2004 05:12:00 +0300 |
parents | 8690d2000e33 |
children | 11c1f1203b65 |
files | src/lib-storage/index/mbox/mbox-sync.c |
diffstat | 1 files changed, 4 insertions(+), 4 deletions(-) [+] |
line wrap: on
line diff
--- a/src/lib-storage/index/mbox/mbox-sync.c Wed Jun 16 05:04:01 2004 +0300 +++ b/src/lib-storage/index/mbox/mbox-sync.c Wed Jun 16 05:12:00 2004 +0300 @@ -67,7 +67,7 @@ { struct index_mailbox *ibox = sync_ctx->ibox; struct stat old_st, st; - uoff_t old_from_offset, old_offset = 0; + uoff_t old_from_offset = 0, old_offset = 0; if (sync_ctx->lock_id != 0) { if (fstat(sync_ctx->fd, &old_st) < 0) { @@ -939,12 +939,12 @@ { struct mbox_sync_mail_context mail_ctx; + sync_ctx->t = mail_index_transaction_begin(sync_ctx->sync_view, FALSE); + sync_ctx->update_base_uid_last = sync_ctx->next_uid-1; + if (mbox_sync_check_excl_lock(sync_ctx) == -1) return -1; - sync_ctx->t = mail_index_transaction_begin(sync_ctx->sync_view, FALSE); - sync_ctx->update_base_uid_last = sync_ctx->next_uid-1; - mbox_sync_restart(sync_ctx); if (mbox_sync_loop(sync_ctx, &mail_ctx, 1) < 0) return -1;