Mercurial > dovecot > core-2.2
changeset 12209:a7a953486a0b
lib-index: If mail_index_sync_begin() fails, don't assert-crash
author | Timo Sirainen <tss@iki.fi> |
---|---|
date | Thu, 30 Sep 2010 16:05:57 +0100 |
parents | a224997afefd |
children | 32f68d621f1d |
files | src/lib-index/mail-index-sync.c |
diffstat | 1 files changed, 3 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/src/lib-index/mail-index-sync.c Thu Sep 30 15:33:56 2010 +0100 +++ b/src/lib-index/mail-index-sync.c Thu Sep 30 16:05:57 2010 +0100 @@ -456,6 +456,9 @@ MAIL_INDEX_TRANSACTION_FLAG_EXTERNAL); mail_index_view_close(&sync_view); + /* set before any rollbacks are called */ + index->syncing = TRUE; + /* we wish to see all the changes from last mailbox sync position to the end of the transaction log */ if (mail_index_sync_set_log_view(ctx->view, hdr->log_file_seq, @@ -488,8 +491,6 @@ ctx->ext_trans = mail_index_transaction_begin(ctx->view, trans_flags); ctx->ext_trans->sync_transaction = TRUE; - index->syncing = TRUE; - *ctx_r = ctx; *view_r = ctx->view; *trans_r = ctx->ext_trans;