]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
mdssvc: fix check if search connection state is gone
authorRalph Boehme <slow@samba.org>
Fri, 19 Nov 2021 12:11:20 +0000 (13:11 +0100)
committerNoel Power <npower@samba.org>
Wed, 3 Aug 2022 13:00:36 +0000 (13:00 +0000)
This was dead code: before this patchset noone set s->mds_es_ctx->mds_ctx to
NULL. A previous commit changed that so now the mds_es_ctx destructor sets
s->mds_es_ctx to NULL if a search "s" was currently in-flight.

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 a0a93d31df00eda3a571dfc1063ee4b60b05ff1a..5e9d76dd1dea24ef625617ee1cb5c46290c6fffd 100644 (file)
@@ -685,7 +685,7 @@ static void mds_es_search_http_send_done(struct tevent_req *subreq)
                return;
        }
 
-       if (state->s->mds_es_ctx->mds_ctx == NULL) {
+       if (state->s->mds_es_ctx == NULL) {
                tevent_req_error(req, ECANCELED);
                return;
        }
@@ -732,7 +732,7 @@ static void mds_es_search_http_read_done(struct tevent_req *subreq)
                tevent_req_done(req);
                return;
        }
-       if (s->mds_es_ctx->mds_ctx == NULL) {
+       if (s->mds_es_ctx == NULL) {
                tevent_req_error(req, ECANCELED);
                return;
        }