dovecot: Don't trigger cache compression based on fields with a ...
dovecot at dovecot.org
dovecot at dovecot.org
Sun Dec 30 00:27:48 EET 2007
details: http://hg.dovecot.org/dovecot/rev/c8507f755f0b
changeset: 7075:c8507f755f0b
user: Timo Sirainen <tss at iki.fi>
date: Sun Dec 30 00:25:36 2007 +0200
description:
Don't trigger cache compression based on fields with a forced decision.
diffstat:
1 file changed, 4 insertions(+), 2 deletions(-)
src/lib-index/mail-cache-fields.c | 6 ++++--
diffs (25 lines):
diff -r 0b2955fc57f1 -r c8507f755f0b src/lib-index/mail-cache-fields.c
--- a/src/lib-index/mail-cache-fields.c Sun Dec 30 00:03:59 2007 +0200
+++ b/src/lib-index/mail-cache-fields.c Sun Dec 30 00:25:36 2007 +0200
@@ -257,6 +257,7 @@ int mail_cache_header_fields_read(struct
const char *p, *names, *end;
void *orig_key, *orig_value;
unsigned int fidx, new_fields_count;
+ enum mail_cache_decision_type dec;
time_t max_drop_time;
uint32_t offset, i;
@@ -367,10 +368,11 @@ int mail_cache_header_fields_read(struct
if (last_used[i] > cache->fields[fidx].last_used)
cache->fields[fidx].last_used = last_used[i];
+ dec = cache->fields[fidx].field.decision;
if ((time_t)cache->fields[fidx].last_used < max_drop_time &&
cache->fields[fidx].last_used != 0 &&
- (cache->fields[fidx].field.decision &
- ~MAIL_CACHE_DECISION_FORCED) != MAIL_CACHE_DECISION_NO) {
+ (dec & MAIL_CACHE_DECISION_FORCED) == 0 &&
+ dec != MAIL_CACHE_DECISION_NO) {
/* time to drop this field. don't bother dropping
fields that have never been used. */
cache->need_compress_file_seq = cache->hdr->file_seq;
More information about the dovecot-cvs
mailing list