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

tss at dovecot.org tss at dovecot.org
Fri Feb 2 14:14:53 UTC 2007


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

Modified Files:
	mail-cache-transaction.c 
Log Message:
crashfix



Index: mail-cache-transaction.c
===================================================================
RCS file: /var/lib/cvs/dovecot/src/lib-index/mail-cache-transaction.c,v
retrieving revision 1.56
retrieving revision 1.57
diff -u -d -r1.56 -r1.57
--- mail-cache-transaction.c	1 Feb 2007 22:23:18 -0000	1.56
+++ mail-cache-transaction.c	2 Feb 2007 14:14:51 -0000	1.57
@@ -470,8 +470,12 @@
 	}
 
 	if (ctx->cache_file_seq == 0) {
-		if ((ret = mail_cache_transaction_lock(ctx)) <= 0)
-			return ret;
+		if (!ctx->cache->opened)
+			(void)mail_cache_open_and_verify(ctx->cache);
+		if (MAIL_CACHE_IS_UNUSABLE(ctx->cache))
+			return -1;
+
+		ctx->cache_file_seq = ctx->cache->hdr->file_seq;
 	}
 
 	if (ctx->cache_file_seq != ctx->cache->hdr->file_seq) {



More information about the dovecot-cvs mailing list