dovecot: Don't drop all fields if day_stamp is still 0 in index ...
dovecot at dovecot.org
dovecot at dovecot.org
Sat Nov 3 22:33:24 EET 2007
details: http://hg.dovecot.org/dovecot/rev/6601ee607b6f
changeset: 6678:6601ee607b6f
user: Timo Sirainen <tss at iki.fi>
date: Sat Nov 03 22:32:21 2007 +0200
description:
Don't drop all fields if day_stamp is still 0 in index header.
diffstat:
1 file changed, 2 insertions(+), 1 deletion(-)
src/lib-index/mail-cache-compress.c | 3 ++-
diffs (13 lines):
diff -r 90bcf480312d -r 6601ee607b6f src/lib-index/mail-cache-compress.c
--- a/src/lib-index/mail-cache-compress.c Sat Nov 03 21:56:05 2007 +0200
+++ b/src/lib-index/mail-cache-compress.c Sat Nov 03 22:32:21 2007 +0200
@@ -202,7 +202,8 @@ mail_cache_copy(struct mail_cache *cache
/* @UNSAFE: drop unused fields and create a field mapping for
used fields */
- max_drop_time = idx_hdr->day_stamp - MAIL_CACHE_FIELD_DROP_SECS;
+ max_drop_time = idx_hdr->day_stamp == 0 ? 0 :
+ idx_hdr->day_stamp - MAIL_CACHE_FIELD_DROP_SECS;
orig_fields_count = cache->fields_count;
for (i = used_fields_count = 0; i < orig_fields_count; i++) {
if (cache->fields[i].last_used < max_drop_time)
More information about the dovecot-cvs
mailing list