dovecot: Don't mark the transaction log corrupted if some record...

dovecot at dovecot.org dovecot at dovecot.org
Sat Jun 16 01:09:30 EEST 2007


details:   http://hg.dovecot.org/dovecot/rev/911b9f0cca13
changeset: 5752:911b9f0cca13
user:      Timo Sirainen <tss at iki.fi>
date:      Sat Jun 16 00:50:16 2007 +0300
description:
Don't mark the transaction log corrupted if some record inside it was
broken. Changed the error message as well.

diffstat:

1 file changed, 5 insertions(+), 12 deletions(-)
src/lib-index/mail-index-sync.c |   17 +++++------------

diffs (38 lines):

diff -r a230272b3f28 -r 911b9f0cca13 src/lib-index/mail-index-sync.c
--- a/src/lib-index/mail-index-sync.c	Sat Jun 16 00:28:30 2007 +0300
+++ b/src/lib-index/mail-index-sync.c	Sat Jun 16 00:50:16 2007 +0300
@@ -195,7 +195,7 @@ static int mail_index_sync_add_recent_up
 
 	if (!seen_recent) {
 		/* no recent messages, drop the sync_recent flag so we
-		   don't scan through the message again */
+		   don't scan through the messages again */
 		ctx->sync_recent = FALSE;
 	}
 
@@ -846,21 +846,14 @@ void mail_index_sync_set_corrupted(struc
 void mail_index_sync_set_corrupted(struct mail_index_sync_map_ctx *ctx,
 				   const char *fmt, ...)
 {
-	const char *error;
 	va_list va;
 
 	va_start(va, fmt);
 	t_push();
-	error = t_strdup_vprintf(fmt, va);
-	if (ctx->type == MAIL_INDEX_SYNC_HANDLER_FILE) {
-		mail_transaction_log_view_set_corrupted(ctx->view->log_view,
-							"%s", error);
-	} else {
-		mail_index_set_error(ctx->view->index,
-			"View synchronization from transaction log "
-			"for index %s failed: %s", ctx->view->index->filepath,
-			error);
-	}
+	mail_index_set_error(ctx->view->index,
+			     "Synchronization error from %s: %s",
+			     ctx->view->index->filepath,
+			     t_strdup_vprintf(fmt, va));
 	t_pop();
 	va_end(va);
 }


More information about the dovecot-cvs mailing list