Mercurial > dovecot > core-2.2
changeset 12925:654b5a2fc926
sdbox: Added more error message logging.
author | Timo Sirainen <tss@iki.fi> |
---|---|
date | Tue, 05 Apr 2011 22:43:54 +0300 |
parents | 699d181a5578 |
children | b6a705c42001 |
files | src/lib-storage/index/dbox-single/sdbox-sync-rebuild.c src/lib-storage/index/dbox-single/sdbox-sync.c |
diffstat | 2 files changed, 14 insertions(+), 3 deletions(-) [+] |
line wrap: on
line diff
--- a/src/lib-storage/index/dbox-single/sdbox-sync-rebuild.c Tue Apr 05 19:08:31 2011 +0300 +++ b/src/lib-storage/index/dbox-single/sdbox-sync-rebuild.c Tue Apr 05 22:43:54 2011 +0300 @@ -153,10 +153,18 @@ MAILBOX_LIST_PATH_TYPE_ALT_MAILBOX); sdbox_sync_set_uidvalidity(ctx); - if (sdbox_sync_index_rebuild_dir(ctx, ctx->box->path, TRUE) < 0) + if (sdbox_sync_index_rebuild_dir(ctx, ctx->box->path, TRUE) < 0) { + mail_storage_set_critical(ctx->box->storage, + "sdbox: Rebuilding failed on path %s", ctx->box->path); ret = -1; - else if (alt_path != NULL) - ret = sdbox_sync_index_rebuild_dir(ctx, alt_path, FALSE); + } else if (alt_path != NULL) { + if (sdbox_sync_index_rebuild_dir(ctx, alt_path, FALSE) < 0) { + mail_storage_set_critical(ctx->box->storage, + "sdbox: Rebuilding failed on alt path %s", + alt_path); + ret = -1; + } + } sdbox_sync_update_header(ctx); return ret; }
--- a/src/lib-storage/index/dbox-single/sdbox-sync.c Tue Apr 05 19:08:31 2011 +0300 +++ b/src/lib-storage/index/dbox-single/sdbox-sync.c Tue Apr 05 22:43:54 2011 +0300 @@ -115,6 +115,9 @@ hdr = mail_index_get_header(ctx->sync_view); if (hdr->uid_validity == 0) { /* newly created index file */ + mail_storage_set_critical(box->storage, + "sdbox %s: Broken index: missing UIDVALIDITY", + box->path); return 0; }