]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
mdssvc: reapply default search destructor when marking a search non-pending
authorRalph Boehme <slow@samba.org>
Thu, 18 Nov 2021 15:51:36 +0000 (16:51 +0100)
committerNoel Power <npower@samba.org>
Wed, 3 Aug 2022 13:00:36 +0000 (13:00 +0000)
This is needed to ensure searches that are scheduled more then once to the
Elasticsarch server (because the first run didn't return all results) get
removed from the list of searches in case the user closes the query.

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 b16426bc65a11922f381ef4dd081769265f5325d..a0a93d31df00eda3a571dfc1063ee4b60b05ff1a 100644 (file)
@@ -564,7 +564,7 @@ static void mds_es_search_unset_pending(struct sl_es_search *s)
        }
 
        s->pending = false;
-       talloc_set_destructor(s, NULL);
+       talloc_set_destructor(s, search_destructor);
 }
 
 static struct tevent_req *mds_es_search_send(TALLOC_CTX *mem_ctx,