From: Volker Lendecke Date: Mon, 27 Sep 2021 11:13:11 +0000 (+0200) Subject: dcesrv_core: Remove unused dcesrv_reinit_context() X-Git-Tag: tdb-1.4.6~349 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=7b62fa967d02f771d4afa9eaeef2f6b2d9f6ccd0;p=thirdparty%2Fsamba.git dcesrv_core: Remove unused dcesrv_reinit_context() This was only used in the prefork source3 rpc servers Signed-off-by: Volker Lendecke Reviewed-by: Samuel Cabrero Reviewed-by: Jeremy Allison Reviewed-by: Stefan Metzmacher --- diff --git a/librpc/rpc/dcesrv_core.c b/librpc/rpc/dcesrv_core.c index ff38bba997b..015c7639a51 100644 --- a/librpc/rpc/dcesrv_core.c +++ b/librpc/rpc/dcesrv_core.c @@ -2428,35 +2428,6 @@ _PUBLIC_ NTSTATUS dcesrv_init_context(TALLOC_CTX *mem_ctx, return NT_STATUS_OK; } -_PUBLIC_ NTSTATUS dcesrv_reinit_context(struct dcesrv_context *dce_ctx) -{ - NTSTATUS status; - - status = dcesrv_shutdown_registered_ep_servers(dce_ctx); - if (!NT_STATUS_IS_OK(status)) { - return status; - } - - /* Clear endpoints */ - while (dce_ctx->endpoint_list != NULL) { - struct dcesrv_endpoint *e = dce_ctx->endpoint_list; - DLIST_REMOVE(dce_ctx->endpoint_list, e); - TALLOC_FREE(e); - } - - /* Remove broken connections */ - dcesrv_cleanup_broken_connections(dce_ctx); - - /* Reinit assoc group idr */ - TALLOC_FREE(dce_ctx->assoc_groups_idr); - dce_ctx->assoc_groups_idr = idr_init(dce_ctx); - if (dce_ctx->assoc_groups_idr == NULL) { - return NT_STATUS_NO_MEMORY; - } - - return NT_STATUS_OK; -} - /** * @brief Set callback functions on an existing dcesrv_context * diff --git a/librpc/rpc/dcesrv_core.h b/librpc/rpc/dcesrv_core.h index 1c0d346bfe4..e8e87bcce94 100644 --- a/librpc/rpc/dcesrv_core.h +++ b/librpc/rpc/dcesrv_core.h @@ -482,7 +482,6 @@ NTSTATUS dcesrv_init_context(TALLOC_CTX *mem_ctx, struct loadparm_context *lp_ctx, struct dcesrv_context_callbacks *cb, struct dcesrv_context **_dce_ctx); -NTSTATUS dcesrv_reinit_context(struct dcesrv_context *dce_ctx); void dcesrv_context_set_callbacks( struct dcesrv_context *dce_ctx, struct dcesrv_context_callbacks *cb);