From: Timo Sirainen Date: Sun, 20 Jun 2004 09:34:10 +0000 (+0300) Subject: cache file fixes X-Git-Tag: 1.1.alpha1~3903 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=74d48e8b8c4ac1ec7a3b2a9fc4b7b5176aec01e8;p=thirdparty%2Fdovecot%2Fcore.git cache file fixes --HG-- branch : HEAD --- diff --git a/src/lib-index/mail-cache.c b/src/lib-index/mail-cache.c index 9c05007dd4..5bb06ec97b 100644 --- a/src/lib-index/mail-cache.c +++ b/src/lib-index/mail-cache.c @@ -512,7 +512,7 @@ int mail_cache_need_reset(struct mail_cache *cache, uint32_t *new_file_seq_r) { if (cache->hdr->file_seq != cache->index->hdr->cache_file_seq) { if (mail_cache_lock(cache, TRUE) == 0) { - *new_file_seq_r = cache->index->hdr->cache_file_seq; + *new_file_seq_r = cache->hdr->file_seq; return TRUE; } } diff --git a/src/lib-index/mail-transaction-log.c b/src/lib-index/mail-transaction-log.c index 564c98daa3..2e4f0fb582 100644 --- a/src/lib-index/mail-transaction-log.c +++ b/src/lib-index/mail-transaction-log.c @@ -1043,8 +1043,9 @@ int mail_transaction_log_append(struct mail_index_transaction *t, index = mail_index_view_get_index(view); log = index->log; - if (t->updates == NULL && t->cache_updates == NULL && - t->expunges == NULL && t->appends == NULL && !t->hdr_changed) { + if (t->updates == NULL && t->new_cache_file_seq == 0 && + t->cache_updates == NULL && t->expunges == NULL && + t->appends == NULL && !t->hdr_changed) { /* nothing to append */ *log_file_seq_r = 0; *log_file_offset_r = 0;