[dovecot-cvs] dovecot: Log an error if a message was expunged unexpectedly.

dovecot at dovecot.org dovecot at dovecot.org
Mon Jun 11 06:32:33 EEST 2007


details:   http://hg.dovecot.org/dovecot/rev/5a37076852d4
changeset: 5688:5a37076852d4
user:      Timo Sirainen <tss at iki.fi>
date:      Mon Jun 11 06:28:07 2007 +0300
description:
Log an error if a message was expunged unexpectedly.

diffstat:

1 file changed, 8 insertions(+), 3 deletions(-)
src/lib-storage/index/mbox/mbox-sync.c |   11 ++++++++---

diffs (21 lines):

diff -r d28185a3131a -r 5a37076852d4 src/lib-storage/index/mbox/mbox-sync.c
--- a/src/lib-storage/index/mbox/mbox-sync.c	Mon Jun 11 06:21:46 2007 +0300
+++ b/src/lib-storage/index/mbox/mbox-sync.c	Mon Jun 11 06:28:07 2007 +0300
@@ -955,9 +955,14 @@ mbox_sync_seek_to_seq(struct mbox_sync_c
 		old_offset = istream_raw_mbox_get_start_offset(sync_ctx->input);
 
 		ret = mbox_file_seek(mbox, sync_ctx->sync_view, seq, &deleted);
-		if (ret < 0)
-			return -1;
-
+		if (ret < 0) {
+			if (deleted) {
+				mbox_sync_set_critical(sync_ctx,
+					"Message was expunged unexpectedly "
+					"in mbox file %s", mbox->path);
+			}
+			return -1;
+		}
 		if (ret == 0) {
 			if (istream_raw_mbox_seek(mbox->mbox_stream,
 						  old_offset) < 0) {


More information about the dovecot-cvs mailing list