[dovecot-cvs] dovecot/src/lib-index mail-cache.c,1.55,1.56
cras at dovecot.org
cras at dovecot.org
Mon Nov 29 19:38:41 EET 2004
Update of /var/lib/cvs/dovecot/src/lib-index
In directory talvi:/tmp/cvs-serv15135/lib-index
Modified Files:
mail-cache.c
Log Message:
Don't write to closed cache file
Index: mail-cache.c
===================================================================
RCS file: /var/lib/cvs/dovecot/src/lib-index/mail-cache.c,v
retrieving revision 1.55
retrieving revision 1.56
diff -u -d -r1.55 -r1.56
--- mail-cache.c 29 Nov 2004 00:17:44 -0000 1.55
+++ mail-cache.c 29 Nov 2004 17:38:38 -0000 1.56
@@ -392,6 +392,12 @@
cache->locked = FALSE;
+ if (MAIL_CACHE_IS_UNUSABLE(cache)) {
+ /* we found it to be broken during the lock. just clean up. */
+ cache->hdr_modified = FALSE;
+ return;
+ }
+
if (cache->hdr_modified) {
cache->hdr_modified = FALSE;
if (pwrite_full(cache->fd, &cache->hdr_copy,
More information about the dovecot-cvs
mailing list