]> git.ipfire.org Git - thirdparty/dovecot/core.git/commitdiff
cache file fixes
authorTimo Sirainen <tss@iki.fi>
Sun, 20 Jun 2004 09:34:10 +0000 (12:34 +0300)
committerTimo Sirainen <tss@iki.fi>
Sun, 20 Jun 2004 09:34:10 +0000 (12:34 +0300)
--HG--
branch : HEAD

src/lib-index/mail-cache.c
src/lib-index/mail-transaction-log.c

index 9c05007dd446a0b064889dd2a5514e3a312787ba..5bb06ec97beaf46ebeae88c5731eac655dac9939 100644 (file)
@@ -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;
                }
        }
index 564c98daa3d73ca4c35a02fb35905cb6c4bce99e..2e4f0fb582d4400455cac7adaa685741b6b1960f 100644 (file)
@@ -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;