[dovecot-cvs] dovecot/src/lib-index mail-index-view-sync.c, 1.52.2.3, 1.52.2.4
tss at dovecot.org
tss at dovecot.org
Sun Jan 14 03:37:16 UTC 2007
Update of /var/lib/cvs/dovecot/src/lib-index
In directory talvi:/tmp/cvs-serv18073
Modified Files:
Tag: branch_1_0
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.52.2.3
retrieving revision 1.52.2.4
diff -u -d -r1.52.2.3 -r1.52.2.4
--- mail-index-view-sync.c 31 Dec 2006 16:08:56 -0000 1.52.2.3
+++ mail-index-view-sync.c 14 Jan 2007 03:37:13 -0000 1.52.2.4
@@ -350,6 +350,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;
@@ -361,11 +369,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