dovecot-2.0: lib-index: If mail_index_sync_begin() fails, don't ...
dovecot at dovecot.org
dovecot at dovecot.org
Thu Sep 30 18:06:02 EEST 2010
details: http://hg.dovecot.org/dovecot-2.0/rev/a7a953486a0b
changeset: 12209:a7a953486a0b
user: Timo Sirainen <tss at iki.fi>
date: Thu Sep 30 16:05:57 2010 +0100
description:
lib-index: If mail_index_sync_begin() fails, don't assert-crash
diffstat:
src/lib-index/mail-index-sync.c | 5 +++--
1 files changed, 3 insertions(+), 2 deletions(-)
diffs (22 lines):
diff -r a224997afefd -r a7a953486a0b src/lib-index/mail-index-sync.c
--- 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;
More information about the dovecot-cvs
mailing list