]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
mdssvc: don't trigger http reconnect if a search was cancelled
authorRalph Boehme <slow@samba.org>
Fri, 19 Nov 2021 12:21:31 +0000 (13:21 +0100)
committerNoel Power <npower@samba.org>
Wed, 3 Aug 2022 13:00:36 +0000 (13:00 +0000)
Calling tevent_req_error() triggers a HTTP reconnect in mds_es_search_done() as
mds_es_search_recv() returns the error so we call mds_es_reconnect_on_error().

slq (which is s->slq) or s->mds_es_ctx will be NULL if the user closed a search
or disconnected a share with an active mdssvc IPC pipe, no need to trigger a
HTTP reconnect for those cases.

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>
source3/rpc_server/mdssvc/mdssvc_es.c

index 5e9d76dd1dea24ef625617ee1cb5c46290c6fffd..b9c9e5ca89335524ddb63952565287de0ed7bfab 100644 (file)
@@ -686,7 +686,7 @@ static void mds_es_search_http_send_done(struct tevent_req *subreq)
        }
 
        if (state->s->mds_es_ctx == NULL) {
-               tevent_req_error(req, ECANCELED);
+               tevent_req_done(req);
                return;
        }
 
@@ -733,7 +733,7 @@ static void mds_es_search_http_read_done(struct tevent_req *subreq)
                return;
        }
        if (s->mds_es_ctx == NULL) {
-               tevent_req_error(req, ECANCELED);
+               tevent_req_done(req);
                return;
        }