Mercurial > dovecot > core-2.2
changeset 11539:b6163de8dffa HEAD
mdbox: Fixed crashing when marking mdbox corrupted and mdbox map had open transactions.
author | Timo Sirainen <tss@iki.fi> |
---|---|
date | Sun, 13 Jun 2010 15:40:57 +0100 |
parents | aa66db4073c5 |
children | 88b6665b48da |
files | src/lib-storage/index/dbox-multi/mdbox-map.c |
diffstat | 1 files changed, 5 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/src/lib-storage/index/dbox-multi/mdbox-map.c Sun Jun 13 15:40:10 2010 +0100 +++ b/src/lib-storage/index/dbox-multi/mdbox-map.c Sun Jun 13 15:40:57 2010 +0100 @@ -189,6 +189,11 @@ mail_index_reset_error(map->index); return -1; } + if (mail_index_view_get_transaction_count(map->view) > 0) { + /* can't sync when there are transactions */ + return 0; + } + ctx = mail_index_view_sync_begin(map->view, MAIL_INDEX_VIEW_SYNC_FLAG_FIX_INCONSISTENT); if (mail_index_view_sync_commit(&ctx, &delayed_expunges) < 0) {