[dovecot-cvs] dovecot/src/lib-index mail-cache-transaction.c, 1.24, 1.25

cras at dovecot.org cras at dovecot.org
Sat Sep 11 18:33:32 EEST 2004


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

Modified Files:
	mail-cache-transaction.c 
Log Message:
Don't crash when cache isn't usable.



Index: mail-cache-transaction.c
===================================================================
RCS file: /var/lib/cvs/dovecot/src/lib-index/mail-cache-transaction.c,v
retrieving revision 1.24
retrieving revision 1.25
diff -u -d -r1.24 -r1.25
--- mail-cache-transaction.c	11 Sep 2004 14:30:06 -0000	1.24
+++ mail-cache-transaction.c	11 Sep 2004 15:33:29 -0000	1.25
@@ -49,7 +49,9 @@
 	ctx->trans = t;
 	ctx->reservations =
 		buffer_create_dynamic(system_pool, 256, (size_t)-1);
-	ctx->cache_file_seq = ctx->cache->hdr->file_seq;
+
+	if (!MAIL_CACHE_IS_UNUSABLE(ctx->cache))
+		ctx->cache_file_seq = ctx->cache->hdr->file_seq;
 
 	i_assert(view->transaction == NULL);
 	view->transaction = ctx;



More information about the dovecot-cvs mailing list