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

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


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

Modified Files:
      Tag: branch_1_0
	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.49.2.2
retrieving revision 1.49.2.3
diff -u -d -r1.49.2.2 -r1.49.2.3
--- mail-cache-transaction.c	1 Feb 2007 22:23:15 -0000	1.49.2.2
+++ mail-cache-transaction.c	2 Feb 2007 14:14:56 -0000	1.49.2.3
@@ -469,8 +469,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