dovecot: Assert-crashfix

dovecot at dovecot.org dovecot at dovecot.org
Sat Nov 3 14:55:18 EET 2007


details:   http://hg.dovecot.org/dovecot/rev/b6c76ea86e2a
changeset: 6667:b6c76ea86e2a
user:      Timo Sirainen <tss at iki.fi>
date:      Sat Nov 03 14:55:14 2007 +0200
description:
Assert-crashfix

diffstat:

1 file changed, 2 insertions(+), 1 deletion(-)
src/lib-index/mail-cache-transaction.c |    3 ++-

diffs (20 lines):

diff -r fc5e27a49c87 -r b6c76ea86e2a src/lib-index/mail-cache-transaction.c
--- a/src/lib-index/mail-cache-transaction.c	Sat Nov 03 12:10:36 2007 +0200
+++ b/src/lib-index/mail-cache-transaction.c	Sat Nov 03 14:55:14 2007 +0200
@@ -791,7 +791,7 @@ void mail_cache_add(struct mail_cache_tr
 	}
 
 	file_field = ctx->cache->field_file_map[field_idx];
-	if (file_field == (uint32_t)-1) {
+	if (MAIL_CACHE_IS_UNUSABLE(ctx->cache) || file_field == (uint32_t)-1) {
 		/* we'll have to add this field to headers */
 		if (mail_cache_header_add_field(ctx, field_idx) < 0)
 			return;
@@ -799,6 +799,7 @@ void mail_cache_add(struct mail_cache_tr
 		file_field = ctx->cache->field_file_map[field_idx];
 		i_assert(file_field != (uint32_t)-1);
 	}
+	i_assert(ctx->cache_file_seq != 0);
 
 	mail_cache_decision_add(ctx->view, seq, field_idx);
 


More information about the dovecot-cvs mailing list