]> git.ipfire.org Git - thirdparty/dovecot/core.git/commitdiff
mdbox: Fixed crashing when marking mdbox corrupted and mdbox map had open transactions.
authorTimo Sirainen <tss@iki.fi>
Sun, 13 Jun 2010 14:40:57 +0000 (15:40 +0100)
committerTimo Sirainen <tss@iki.fi>
Sun, 13 Jun 2010 14:40:57 +0000 (15:40 +0100)
--HG--
branch : HEAD

src/lib-storage/index/dbox-multi/mdbox-map.c

index 69a51f3acc3ac4dd96056f8877fce3ab4ce1026f..be278b366c5b78efd16c43de1aae3fe3a2cae2b1 100644 (file)
@@ -189,6 +189,11 @@ int mdbox_map_refresh(struct mdbox_map *map)
                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) {