dovecot: Change "permanent" cache decisions to "temporary" when ...
dovecot at dovecot.org
dovecot at dovecot.org
Mon Aug 13 20:25:33 EEST 2007
details: http://hg.dovecot.org/dovecot/rev/3f6fadbe6888
changeset: 6297:3f6fadbe6888
user: Timo Sirainen <tss at iki.fi>
date: Mon Aug 13 20:25:26 2007 +0300
description:
Change "permanent" cache decisions to "temporary" when compressing. They'll
get updated back to permanent later if needed.
diffstat:
1 file changed, 7 insertions(+)
src/lib-index/mail-cache-compress.c | 7 +++++++
diffs (24 lines):
diff -r 205ee38f10d1 -r 3f6fadbe6888 src/lib-index/mail-cache-compress.c
--- a/src/lib-index/mail-cache-compress.c Mon Aug 13 20:16:55 2007 +0300
+++ b/src/lib-index/mail-cache-compress.c Mon Aug 13 20:25:26 2007 +0300
@@ -114,6 +114,7 @@ mail_cache_compress_get_fields(struct ma
unsigned int used_fields_count)
{
struct mail_cache *cache = ctx->cache;
+ struct mail_cache_field *field;
unsigned int i, j, idx;
/* Make mail_cache_header_fields_get() return the fields in
@@ -134,6 +135,12 @@ mail_cache_compress_get_fields(struct ma
cache->file_field_map[idx] = i;
j++;
}
+
+ /* change permanent decisions to temporary decisions.
+ if they're still permanent they'll get updated later. */
+ field = &cache->fields[i].field;
+ if (field->decision == MAIL_CACHE_DECISION_YES)
+ field->decision = MAIL_CACHE_DECISION_TEMP;
}
i_assert(j == used_fields_count);
More information about the dovecot-cvs
mailing list