Mercurial > dovecot > original-hg > dovecot-1.2
changeset 7068:180e219aab9a HEAD
Don't drop fields whose decision has been forced.
author | Timo Sirainen <tss@iki.fi> |
---|---|
date | Sat, 29 Dec 2007 21:23:50 +0200 |
parents | 7999ce2bb43a |
children | 46d531d521b9 |
files | src/lib-index/mail-cache-compress.c |
diffstat | 1 files changed, 7 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- 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 @@ 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 ?