changeset 6760:74f4cea90bcd HEAD

If transaction log contains records with unknown types, log an error instead of assert-crashing.
author Timo Sirainen <tss@iki.fi>
date Sat, 10 Nov 2007 19:39:06 +0200
parents 8e0d9821c0d7
children d0a2e137f044
files src/lib-index/mail-index-sync-update.c
diffstat 1 files changed, 5 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/src/lib-index/mail-index-sync-update.c	Sat Nov 10 19:18:51 2007 +0200
+++ b/src/lib-index/mail-index-sync-update.c	Sat Nov 10 19:39:06 2007 +0200
@@ -594,7 +594,11 @@
 		break;
 	}
 	default:
-		i_unreached();
+		mail_index_sync_set_corrupted(ctx,
+			"Unknown transaction record type 0x%x",
+			(hdr->type & MAIL_TRANSACTION_TYPE_MASK));
+		ret = -1;
+		break;
 	}
 	t_pop();
 	return ret;