changeset 5752:911b9f0cca13 HEAD

Don't mark the transaction log corrupted if some record inside it was broken. Changed the error message as well.
author Timo Sirainen <tss@iki.fi>
date Sat, 16 Jun 2007 00:50:16 +0300
parents a230272b3f28
children 929cc98ac04e
files src/lib-index/mail-index-sync.c
diffstat 1 files changed, 5 insertions(+), 12 deletions(-) [+]
line wrap: on
line diff
--- 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 @@
 
 	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(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);
 }