summaryrefslogtreecommitdiff
path: root/source3/rpc_server
diff options
context:
space:
mode:
authorRalph Boehme <slow@samba.org>2021-11-19 13:28:17 +0100
committerNoel Power <npower@samba.org>2022-08-03 13:00:36 +0000
commit5b750d6b330a53f96924106eddb5be4224a5fc4a (patch)
treecdf0e517969f843d5482e946c37c8afb181895f2 /source3/rpc_server
parentc0d46796d435174ff71ede9175097fc01546d69f (diff)
downloadsamba-5b750d6b330a53f96924106eddb5be4224a5fc4a.tar.gz
mdssvc: consolidate calls of mds_es_search_unset_pending()
Both codepaths were mds_es_search_unset_pending() is currently called end up going through the higher level callback mds_es_search_done(). Moving the call to mds_es_search_unset_pending() ensures we call it consistently and don't miss it in some error code path. Otherwise no change in behaviour. BUG: https://bugzilla.samba.org/show_bug.cgi?id=14915 Signed-off-by: Ralph Boehme <slow@samba.org> Reviewed-by: Noel Power <npower@samba.org>
Diffstat (limited to 'source3/rpc_server')
-rw-r--r--source3/rpc_server/mdssvc/mdssvc_es.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/source3/rpc_server/mdssvc/mdssvc_es.c b/source3/rpc_server/mdssvc/mdssvc_es.c
index a7a13f70c7b..cc79b42d14f 100644
--- a/source3/rpc_server/mdssvc/mdssvc_es.c
+++ b/source3/rpc_server/mdssvc/mdssvc_es.c
@@ -112,6 +112,7 @@ static struct tevent_req *mds_es_connect_send(
static int mds_es_connect_recv(struct tevent_req *req);
static void mds_es_connected(struct tevent_req *subreq);
static bool mds_es_next_search_trigger(struct mds_es_ctx *mds_es_ctx);
+static void mds_es_search_unset_pending(struct sl_es_search *s);
static bool mds_es_connect(struct mds_ctx *mds_ctx)
{
@@ -440,6 +441,7 @@ static void mds_es_search_done(struct tevent_req *subreq)
DBG_DEBUG("Search done for search [%p]\n", s);
+ mds_es_search_unset_pending(s);
DLIST_REMOVE(mds_es_ctx->searches, s);
ret = mds_es_search_recv(subreq);
@@ -650,7 +652,6 @@ static void mds_es_search_http_send_done(struct tevent_req *subreq)
}
if (state->s->mds_es_ctx->mds_ctx == NULL) {
- mds_es_search_unset_pending(state->s);
tevent_req_error(req, ECANCELED);
return;
}
@@ -685,8 +686,6 @@ static void mds_es_search_http_read_done(struct tevent_req *subreq)
DBG_DEBUG("Got response for search [%p]\n", s);
- mds_es_search_unset_pending(s);
-
status = http_read_response_recv(subreq, state, &state->http_response);
TALLOC_FREE(subreq);
if (!NT_STATUS_IS_OK(status)) {