Mercurial > dovecot > core-2.2
changeset 22815:880bd0712ef1
LAYOUT=index: Fix crash in doveadm force-resync if storage doesn't implement list_index_corrupted()
Broken by recent changes.
author | Timo Sirainen <timo.sirainen@dovecot.fi> |
---|---|
date | Wed, 13 Dec 2017 15:48:17 +0200 |
parents | 2d409988e1c8 |
children | d1debec5d1c1 |
files | src/lib-storage/list/mailbox-list-index-backend.c |
diffstat | 1 files changed, 2 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/src/lib-storage/list/mailbox-list-index-backend.c Tue Dec 12 18:10:40 2017 +0200 +++ b/src/lib-storage/list/mailbox-list-index-backend.c Wed Dec 13 15:48:17 2017 +0200 @@ -582,7 +582,8 @@ !ilist->force_resynced) { box->storage->list_index_rebuild_reason = MAIL_STORAGE_LIST_INDEX_REBUILD_REASON_FORCE_RESYNC; - if (box->storage->v.list_index_corrupted(box->storage) < 0) + if (box->storage->v.list_index_corrupted != NULL && + box->storage->v.list_index_corrupted(box->storage) < 0) ilist->force_resync_failed = TRUE; /* try to rebuild list index only once - even if it failed */ ilist->force_resynced = TRUE;