From: Timo Sirainen Date: Sat, 18 Oct 2008 13:26:04 +0000 (+0300) Subject: index files: Another try at fixing handling log files with different header sizes. X-Git-Tag: 1.2.alpha3~25 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=c21c33a8c98972c45349066fc76ac9e2c05013c1;p=thirdparty%2Fdovecot%2Fcore.git index files: Another try at fixing handling log files with different header sizes. --HG-- branch : HEAD --- diff --git a/src/lib-index/mail-index-sync-update.c b/src/lib-index/mail-index-sync-update.c index b2f3156d01..f18a8f7f51 100644 --- a/src/lib-index/mail-index-sync-update.c +++ b/src/lib-index/mail-index-sync-update.c @@ -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) { diff --git a/src/lib-index/mail-transaction-log-view.c b/src/lib-index/mail-transaction-log-view.c index 1b74f92de0..0adc31a027 100644 --- a/src/lib-index/mail-transaction-log-view.c +++ b/src/lib-index/mail-transaction-log-view.c @@ -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);