[dovecot-cvs] dovecot/src/lib-index mail-index-view-sync.c, 1.58, 1.59
tss at dovecot.org
tss at dovecot.org
Sun Jan 14 03:37:20 UTC 2007
Update of /var/lib/cvs/dovecot/src/lib-index
In directory talvi:/tmp/cvs-serv18078
Modified Files:
mail-index-view-sync.c
Log Message:
View syncing could have caused some transactions to be synced multiple
times in some situations.
Index: mail-index-view-sync.c
===================================================================
RCS file: /var/lib/cvs/dovecot/src/lib-index/mail-index-view-sync.c,v
retrieving revision 1.58
retrieving revision 1.59
diff -u -d -r1.58 -r1.59
--- mail-index-view-sync.c 31 Dec 2006 16:09:00 -0000 1.58
+++ mail-index-view-sync.c 14 Jan 2007 03:37:17 -0000 1.59
@@ -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;
More information about the dovecot-cvs
mailing list