ARRAY(struct mail_index_sync_list) sync_list;
uint32_t next_uid;
uint32_t last_tail_seq, last_tail_offset;
+
+ unsigned int no_warning:1;
};
static void mail_index_sync_add_expunge(struct mail_index_sync_ctx *ctx)
sync_list->idx = 0;
}
+void mail_index_sync_no_warning(struct mail_index_sync_ctx *ctx)
+{
+ ctx->no_warning = TRUE;
+}
+
static void mail_index_sync_end(struct mail_index_sync_ctx **_ctx)
{
struct mail_index_sync_ctx *ctx = *_ctx;
ctx->index->syncing = FALSE;
mail_transaction_log_sync_unlock(ctx->index->log,
- "Mailbox was synchronized");
+ ctx->no_warning ? NULL : "Mailbox was synchronized");
mail_index_view_close(&ctx->view);
mail_index_transaction_rollback(&ctx->sync_trans);
/* Update result when refreshing index at the end of sync. */
void mail_index_sync_set_commit_result(struct mail_index_sync_ctx *ctx,
struct mail_index_transaction_commit_result *result);
+/* Don't log a warning even if syncing took over
+ MAIL_TRANSACTION_LOG_LOCK_WARN_SECS seconds. Usually this is called because
+ the caller itself already logged a warning about it. */
+void mail_index_sync_no_warning(struct mail_index_sync_ctx *ctx);
/* Commit synchronization by writing all changes to mail index file. */
int mail_index_sync_commit(struct mail_index_sync_ctx **ctx);
/* Rollback synchronization - none of the changes listed by sync_next() are
mailbox_get_path(&ctx->mbox->box), time_diff,
ctx->new_msgs_count, ctx->flag_change_count,
ctx->expunge_count);
+ mail_index_sync_no_warning(ctx->sync_ctx);
}
if (ret < 0)