[dovecot-cvs] dovecot/src/lib-index mail-cache-transaction.c, 1.57, 1.58

tss at dovecot.org tss at dovecot.org
Thu Feb 22 13:45:44 UTC 2007


Update of /var/lib/cvs/dovecot/src/lib-index
In directory talvi:/tmp/cvs-serv13531

Modified Files:
	mail-cache-transaction.c 
Log Message:
Crashfix in error conditions.



Index: mail-cache-transaction.c
===================================================================
RCS file: /var/lib/cvs/dovecot/src/lib-index/mail-cache-transaction.c,v
retrieving revision 1.57
retrieving revision 1.58
diff -u -d -r1.57 -r1.58
--- mail-cache-transaction.c	2 Feb 2007 14:14:51 -0000	1.57
+++ mail-cache-transaction.c	22 Feb 2007 13:45:42 -0000	1.58
@@ -69,7 +69,8 @@
 
 static void mail_cache_transaction_reset(struct mail_cache_transaction_ctx *ctx)
 {
-	ctx->cache_file_seq = ctx->cache->hdr->file_seq;
+	ctx->cache_file_seq = MAIL_CACHE_IS_UNUSABLE(ctx->cache) ? 0 :
+		ctx->cache->hdr->file_seq;
 
 	if (ctx->cache_data)
 		buffer_set_used_size(ctx->cache_data, 0);



More information about the dovecot-cvs mailing list