From: Marco Bettini Date: Mon, 5 Jun 2023 15:43:42 +0000 (+0000) Subject: lib-storage: search_more() - Ensure mailbox_search_notify() is invoked X-Git-Tag: 2.4.0~2697 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=398e0a0482e649f4af252341da17a80a47b8eef4;p=thirdparty%2Fdovecot%2Fcore.git lib-storage: search_more() - Ensure mailbox_search_notify() is invoked --- diff --git a/src/lib-storage/index/index-search.c b/src/lib-storage/index/index-search.c index 930f810f0a..1df02315cd 100644 --- a/src/lib-storage/index/index-search.c +++ b/src/lib-storage/index/index-search.c @@ -1812,6 +1812,7 @@ static int search_more(struct index_search_context *ctx, ret = -1; break; } + mailbox_search_notify(ctx->box, &ctx->mail_ctx); } return ret; } diff --git a/src/lib-storage/mail-storage.c b/src/lib-storage/mail-storage.c index adc27375e3..58778807e3 100644 --- a/src/lib-storage/mail-storage.c +++ b/src/lib-storage/mail-storage.c @@ -2543,8 +2543,7 @@ mailbox_search_set_progress_hidden(struct mail_search_context *ctx, bool hidden) ctx->progress_hidden = hidden; } -static void mailbox_search_notify(struct mailbox *box, - struct mail_search_context *ctx) +void mailbox_search_notify(struct mailbox *box, struct mail_search_context *ctx) { if (ctx->search_start_time.tv_sec == 0) { ctx->search_start_time = ioloop_timeval; diff --git a/src/lib-storage/mail-storage.h b/src/lib-storage/mail-storage.h index b3a19b1be9..9afd32a453 100644 --- a/src/lib-storage/mail-storage.h +++ b/src/lib-storage/mail-storage.h @@ -761,6 +761,7 @@ bool mailbox_search_next(struct mail_search_context *ctx, struct mail **mail_r); more results will be returned by calling the function again. */ bool mailbox_search_next_nonblock(struct mail_search_context *ctx, struct mail **mail_r, bool *tryagain_r); +void mailbox_search_notify(struct mailbox *box, struct mail_search_context *ctx); /* Returns TRUE if some messages were already expunged and we couldn't determine correctly if those messages should have been returned in this search. */