Mercurial > dovecot > original-hg > dovecot-1.2
changeset 5650:e5f0e8cf6089 HEAD
Sync transaction needs to be created later or we'll crash
author | Timo Sirainen <tss@iki.fi> |
---|---|
date | Tue, 22 May 2007 21:28:19 +0300 |
parents | b0754b4d187d |
children | aff5fb7bb580 |
files | src/lib-index/mail-index-sync.c |
diffstat | 1 files changed, 5 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/src/lib-index/mail-index-sync.c Tue May 22 21:26:02 2007 +0300 +++ b/src/lib-index/mail-index-sync.c Tue May 22 21:28:19 2007 +0300 @@ -408,7 +408,6 @@ ctx->sync_dirty = sync_dirty; ctx->view = mail_index_view_open(index); - ctx->ext_trans = mail_index_transaction_begin(ctx->view, FALSE, TRUE); sync_view = mail_index_dummy_view_open(index); ctx->sync_trans = mail_index_transaction_begin(sync_view, FALSE, TRUE); @@ -456,6 +455,11 @@ } ctx->view->index_sync_view = TRUE; + + /* create the transaction after the view has been updated with + external transactions and marked as sync view */ + ctx->ext_trans = mail_index_transaction_begin(ctx->view, FALSE, TRUE); + *ctx_r = ctx; *view_r = ctx->view; *trans_r = ctx->ext_trans;