[dovecot-cvs] dovecot/src/lib-index mail-cache-transaction.c, 1.33, 1.34

cras at dovecot.org cras at dovecot.org
Mon Nov 29 03:25:47 EET 2004


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

Modified Files:
	mail-cache-transaction.c 
Log Message:
Make sure we don't try to write to cache file when it's already closed
(could happen if it was corrupted).



Index: mail-cache-transaction.c
===================================================================
RCS file: /var/lib/cvs/dovecot/src/lib-index/mail-cache-transaction.c,v
retrieving revision 1.33
retrieving revision 1.34
diff -u -d -r1.33 -r1.34
--- mail-cache-transaction.c	8 Nov 2004 00:55:02 -0000	1.33
+++ mail-cache-transaction.c	29 Nov 2004 01:25:45 -0000	1.34
@@ -271,6 +271,9 @@
 
 	i_assert(cache->locked);
 
+	if (MAIL_CACHE_IS_UNUSABLE(cache))
+		return;
+
 	if (offset + size == cache->hdr_copy.used_file_size) {
 		/* we can just set used_file_size back */
 		cache->hdr_modified = TRUE;



More information about the dovecot-cvs mailing list