dovecot: Don't drop fields whose decision has been forced.
dovecot at dovecot.org
dovecot at dovecot.org
Sat Dec 29 21:24:33 EET 2007
details: http://hg.dovecot.org/dovecot/rev/180e219aab9a
changeset: 7068:180e219aab9a
user: Timo Sirainen <tss at iki.fi>
date: Sat Dec 29 21:23:50 2007 +0200
description:
Don't drop fields whose decision has been forced.
diffstat:
1 file changed, 7 insertions(+), 1 deletion(-)
src/lib-index/mail-cache-compress.c | 8 +++++++-
diffs (18 lines):
diff -r 7999ce2bb43a -r 180e219aab9a src/lib-index/mail-cache-compress.c
--- a/src/lib-index/mail-cache-compress.c Sat Dec 29 21:12:56 2007 +0200
+++ b/src/lib-index/mail-cache-compress.c Sat Dec 29 21:23:50 2007 +0200
@@ -206,7 +206,13 @@ mail_cache_copy(struct mail_cache *cache
used_fields_count = i;
} else {
for (i = used_fields_count = 0; i < orig_fields_count; i++) {
- if ((time_t)cache->fields[i].last_used < max_drop_time)
+ enum mail_cache_decision_type dec =
+ cache->fields[i].field.decision;
+
+ /* if the decision isn't forced and this field hasn't
+ been accessed for a while, drop it */
+ if ((dec & MAIL_CACHE_DECISION_FORCED) == 0 &&
+ (time_t)cache->fields[i].last_used < max_drop_time)
cache->fields[i].used = FALSE;
ctx.field_file_map[i] = !cache->fields[i].used ?
More information about the dovecot-cvs
mailing list