dovecot: Crashfix if cache file got unusable in the middle of a ...

dovecot at dovecot.org dovecot at dovecot.org
Thu Nov 8 05:56:53 EET 2007


details:   http://hg.dovecot.org/dovecot/rev/72dad50b1c9f
changeset: 6733:72dad50b1c9f
user:      Timo Sirainen <tss at iki.fi>
date:      Thu Nov 08 05:56:50 2007 +0200
description:
Crashfix if cache file got unusable in the middle of a transaction.

diffstat:

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

diffs (13 lines):

diff -r f4b266590003 -r 72dad50b1c9f src/lib-index/mail-cache-transaction.c
--- a/src/lib-index/mail-cache-transaction.c	Thu Nov 08 04:10:30 2007 +0200
+++ b/src/lib-index/mail-cache-transaction.c	Thu Nov 08 05:56:50 2007 +0200
@@ -828,7 +828,8 @@ void mail_cache_add(struct mail_cache_tr
 		mail_cache_transaction_open_if_needed(ctx);
 		if (!MAIL_CACHE_IS_UNUSABLE(ctx->cache))
 			ctx->cache_file_seq = ctx->cache->hdr->file_seq;
-	} else if (ctx->cache_file_seq != ctx->cache->hdr->file_seq) {
+	} else if (!MAIL_CACHE_IS_UNUSABLE(ctx->cache) &&
+		   ctx->cache_file_seq != ctx->cache->hdr->file_seq) {
 		/* cache was compressed within this transaction */
 		mail_cache_transaction_reset(ctx);
 	}


More information about the dovecot-cvs mailing list