dovecot: If cache file header is corrupted, keep hdr=NULL so cac...
dovecot at dovecot.org
dovecot at dovecot.org
Tue Nov 6 19:13:38 EET 2007
details: http://hg.dovecot.org/dovecot/rev/34a5cf8675fc
changeset: 6702:34a5cf8675fc
user: Timo Sirainen <tss at iki.fi>
date: Tue Nov 06 19:13:33 2007 +0200
description:
If cache file header is corrupted, keep hdr=NULL so cache file isn't tried
to be used.
diffstat:
1 file changed, 2 insertions(+)
src/lib-index/mail-cache.c | 2 ++
diffs (19 lines):
diff -r c601e8cd0ffc -r 34a5cf8675fc src/lib-index/mail-cache.c
--- a/src/lib-index/mail-cache.c Tue Nov 06 18:39:48 2007 +0200
+++ b/src/lib-index/mail-cache.c Tue Nov 06 19:13:33 2007 +0200
@@ -256,6 +256,7 @@ int mail_cache_map(struct mail_cache *ca
!MAIL_CACHE_IS_UNUSABLE(cache) &&
cache->hdr->file_seq != 0 ?
cache->hdr->file_seq : 0;
+ cache->hdr = NULL;
return -1;
}
return 0;
@@ -299,6 +300,7 @@ int mail_cache_map(struct mail_cache *ca
!MAIL_CACHE_IS_UNUSABLE(cache) &&
cache->hdr->file_seq != 0 ?
cache->hdr->file_seq : 0;
+ cache->hdr = NULL;
return -1;
}
More information about the dovecot-cvs
mailing list