Mercurial > dovecot > original-hg > dovecot-1.2
changeset 3359:455b4a29166c HEAD
Added some error handling code to prevent assert crashes.
author | Timo Sirainen <tss@iki.fi> |
---|---|
date | Sun, 08 May 2005 17:12:58 +0300 |
parents | d6723f532d26 |
children | 8df4cfb22171 |
files | src/lib-storage/index/mbox/mbox-file.c src/lib-storage/index/mbox/mbox-sync.c |
diffstat | 2 files changed, 11 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/src/lib-storage/index/mbox/mbox-file.c Sun May 08 13:09:43 2005 +0300 +++ b/src/lib-storage/index/mbox/mbox-file.c Sun May 08 17:12:58 2005 +0300 @@ -137,6 +137,7 @@ mail_storage_set_critical(STORAGE(mbox->storage), "Cached message offset lost for seq %u in mbox file %s", seq, mbox->path); + mbox->mbox_sync_dirty = TRUE; return 0; } @@ -154,6 +155,7 @@ mail_storage_set_critical(STORAGE(mbox->storage), "Cached message offset %s is invalid for mbox file %s", dec2str(offset), mbox->path); + mbox->mbox_sync_dirty = TRUE; return 0; }
--- a/src/lib-storage/index/mbox/mbox-sync.c Sun May 08 13:09:43 2005 +0300 +++ b/src/lib-storage/index/mbox/mbox-sync.c Sun May 08 17:12:58 2005 +0300 @@ -961,6 +961,15 @@ if (mail_ctx->uid_broken && partial) { /* UID ordering problems, resync everything to make sure we get everything right */ + if (sync_ctx->mbox->mbox_sync_dirty) + return 0; + + mail_storage_set_critical( + STORAGE(sync_ctx->mbox->storage), + "UIDs broken with partial sync in mbox file %s", + sync_ctx->mbox->path); + + sync_ctx->mbox->mbox_sync_dirty = TRUE; return 0; }