Mercurial > dovecot > original-hg > dovecot-1.2
changeset 5003:327d82f579a2 HEAD
View syncing could have caused some transactions to be synced multiple
times in some situations.
author | Timo Sirainen <tss@iki.fi> |
---|---|
date | Sun, 14 Jan 2007 05:37:17 +0200 |
parents | 82747a8b0b8b |
children | 13db2cd1ae94 |
files | src/lib-index/mail-index-view-sync.c |
diffstat | 1 files changed, 9 insertions(+), 5 deletions(-) [+] |
line wrap: on
line diff
--- a/src/lib-index/mail-index-view-sync.c Sun Jan 14 05:17:07 2007 +0200 +++ b/src/lib-index/mail-index-view-sync.c Sun Jan 14 05:37:17 2007 +0200 @@ -342,6 +342,14 @@ /* Get the next transaction from log. */ ret = mail_transaction_log_view_next(log_view, &ctx->hdr, &ctx->data, &skipped); + + if (skipped) { + /* We skipped some (visible) transactions that were + outside our sync mask. Note that we may get here + even when ret=0. */ + ctx->skipped_some = TRUE; + } + if (ret <= 0) { if (ret < 0) return -1; @@ -353,11 +361,7 @@ mail_transaction_log_view_get_prev_pos(log_view, &seq, &offset); - if (skipped) { - /* We skipped some (visible) transactions that were - outside our sync mask. */ - ctx->skipped_some = TRUE; - } else if (!ctx->skipped_some) { + if (!ctx->skipped_some) { /* We haven't skipped anything while syncing this view. Update this view's synced log offset. */ view->log_file_seq = seq;