Mercurial > dovecot > core-2.2
changeset 22770:e07da7d8ef13
lib-index: Fix adding forced cache decisions to existing cache files
If a field already existed in the cache file, the cache decision from the
file was always used. This caused force-decisions to be ignored.
author | Timo Sirainen <timo.sirainen@dovecot.fi> |
---|---|
date | Mon, 22 Jan 2018 17:38:32 +0200 |
parents | e6a9ff4a07d5 |
children | 648583df4d47 |
files | src/lib-index/mail-cache-fields.c |
diffstat | 1 files changed, 3 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/src/lib-index/mail-cache-fields.c Mon Nov 20 17:03:47 2017 +0200 +++ b/src/lib-index/mail-cache-fields.c Mon Jan 22 17:38:32 2018 +0200 @@ -398,7 +398,9 @@ &orig_key, &orig_value)) { /* already exists, see if decision can be updated */ fidx = POINTER_CAST_TO(orig_value, unsigned int); - if (!cache->fields[fidx].decision_dirty) { + if (!cache->fields[fidx].decision_dirty && + (cache->fields[fidx].field.decision & + MAIL_CACHE_DECISION_FORCED) == 0) { cache->fields[fidx].field.decision = decisions[i]; }