dovecot: Make sure we don't try to re-read cache fields when com...
dovecot at dovecot.org
dovecot at dovecot.org
Mon Aug 13 20:19:39 EEST 2007
details: http://hg.dovecot.org/dovecot/rev/30904b20782d
changeset: 6295:30904b20782d
user: Timo Sirainen <tss at iki.fi>
date: Mon Aug 13 20:16:07 2007 +0300
description:
Make sure we don't try to re-read cache fields when compressing.
diffstat:
1 file changed, 5 insertions(+), 3 deletions(-)
src/lib-index/mail-cache-lookup.c | 8 +++++---
diffs (18 lines):
diff -r 10a5f61d9692 -r 30904b20782d src/lib-index/mail-cache-lookup.c
--- a/src/lib-index/mail-cache-lookup.c Mon Aug 13 20:05:41 2007 +0300
+++ b/src/lib-index/mail-cache-lookup.c Mon Aug 13 20:16:07 2007 +0300
@@ -199,9 +199,11 @@ int mail_cache_lookup_iter_next(struct m
if (file_field >= cache->file_fields_count) {
/* new field, have to re-read fields header to figure
- out its size */
- if (mail_cache_header_fields_read(cache) < 0)
- return -1;
+ out its size. don't do this if we're compressing. */
+ if (!cache->locked) {
+ if (mail_cache_header_fields_read(cache) < 0)
+ return -1;
+ }
if (file_field >= cache->file_fields_count) {
mail_cache_set_corrupted(cache,
"field index too large (%u >= %u)",
More information about the dovecot-cvs
mailing list