[dovecot-cvs] dovecot/src/lib-index mail-cache-transaction.c, 1.49.2.3, 1.49.2.4

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


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

Modified Files:
      Tag: branch_1_0
	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.49.2.3
retrieving revision 1.49.2.4
diff -u -d -r1.49.2.3 -r1.49.2.4
--- mail-cache-transaction.c	2 Feb 2007 14:14:56 -0000	1.49.2.3
+++ mail-cache-transaction.c	22 Feb 2007 13:45:40 -0000	1.49.2.4
@@ -68,7 +68,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