]> git.ipfire.org Git - thirdparty/dovecot/core.git/commitdiff
index files: Another try at fixing handling log files with different header sizes.
authorTimo Sirainen <tss@iki.fi>
Sat, 18 Oct 2008 13:26:04 +0000 (16:26 +0300)
committerTimo Sirainen <tss@iki.fi>
Sat, 18 Oct 2008 13:26:04 +0000 (16:26 +0300)
--HG--
branch : HEAD

src/lib-index/mail-index-sync-update.c
src/lib-index/mail-transaction-log-view.c

index b2f3156d0183293bd60021de69a30ff34ecab80d..f18a8f7f511fbae44773301cc99182b9f7fe6123 100644 (file)
@@ -42,6 +42,7 @@ mail_index_sync_update_log_offset(struct mail_index_sync_map_ctx *ctx,
                           to sync it over and over again. */
                        prev_offset = ctx->ext_intro_offset;
                }
+               map->hdr.log_file_seq = prev_seq;
        } else {
                i_assert(ctx->view->index->log->head->hdr.file_seq == prev_seq);
                if (map->hdr.log_file_seq != prev_seq) {
index 1b74f92de0ca2d525f332ed4b4ebcad287f4824f..0adc31a027f84a619f75378abc5613035a69b667 100644 (file)
@@ -221,14 +221,14 @@ int mail_transaction_log_view_set(struct mail_transaction_log_view *view,
 
        if (min_file_offset == 0) {
                /* beginning of the file */
-               min_file_offset = view->head->hdr.hdr_size;
+               min_file_offset = view->tail->hdr.hdr_size;
                if (min_file_offset > max_file_offset &&
                    min_file_seq == max_file_seq) {
                        /* we don't actually want to show anything */
                        max_file_offset = min_file_offset;
                }
        }
-       i_assert(min_file_offset >= view->head->hdr.hdr_size);
+       i_assert(min_file_offset >= view->tail->hdr.hdr_size);
 
        /* we have all of them. update refcounts. */
        mail_transaction_log_view_unref_all(view);