]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
s3:rpc_server: Remove unused RPC module init and shutdown callbacks
authorSamuel Cabrero <scabrero@suse.de>
Tue, 28 May 2019 14:54:52 +0000 (16:54 +0200)
committerSamuel Cabrero <scabrero@sn-devel-184>
Fri, 20 Mar 2020 15:36:36 +0000 (15:36 +0000)
The setup function registers the endpoint server and RPC core routines
initialize and shutdown it.

Signed-off-by: Samuel Cabrero <scabrero@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
source3/rpc_server/mdssvc/srv_mdssvc_nt.c
source3/rpc_server/rpc_modules.c
source3/rpc_server/rpc_modules.h

index e04c19e684b6e21d4ef42dd54e91b6cb38c90664..c09d430a6104e411b116d66ce32d4e611cd5f6a5 100644 (file)
@@ -72,8 +72,6 @@ static bool rpc_setup_mdssvc(struct tevent_context *ev_ctx,
 
 static struct rpc_module_fns rpc_module_mdssvc_fns = {
        .setup = rpc_setup_mdssvc,
-       .init = NULL,
-       .shutdown = NULL
 };
 
 static_decl_rpc;
index d8f24bc1220f9b9975b6fb725b34dfdb48c5a04c..be678eb5f812e809e8d4779f8bc40adc16beb58a 100644 (file)
@@ -100,42 +100,3 @@ bool setup_rpc_modules(struct tevent_context *ev_ctx,
 
        return true;
 }
-
-bool init_rpc_module(const char *name,
-                    const struct rpc_srv_callbacks *rpc_srv_cb)
-{
-       struct rpc_module *module = find_rpc_module(name);
-       NTSTATUS status;
-
-       if (module == NULL) {
-               return false;
-       }
-
-       status = module->fns->init(rpc_srv_cb);
-       if (!NT_STATUS_IS_OK(status)) {
-               DBG_ERR("calling init for %s failed %s\n",
-                       name, nt_errstr(status));
-               return false;
-       }
-
-       return true;
-}
-
-bool shutdown_rpc_module(const char *name)
-{
-       struct rpc_module *module = find_rpc_module(name);
-       NTSTATUS status;
-
-       if (module == NULL) {
-               return false;
-       }
-
-       status = module->fns->shutdown();
-       if (!NT_STATUS_IS_OK(status)) {
-               DBG_ERR("calling shutdown for %s failed %s\n",
-                       name, nt_errstr(status));
-               return false;
-       }
-
-       return true;
-}
index afac1d911ca228b077ac48251304bccd21b9caef..ccdaabb4cced01988e1ca2bee12123fda1e7cb3c 100644 (file)
 #ifndef _RPC_MODULES_H
 #define _RPC_MODULES_H
 
-struct rpc_srv_callbacks;
-
 struct rpc_module_fns {
-       bool (*setup)(struct tevent_context *ev_ctx, struct messaging_context *msg_ctx);
-       NTSTATUS (*init)(const struct rpc_srv_callbacks *rpc_srv_cb);
-       NTSTATUS (*shutdown)(void);
+       bool (*setup)(struct tevent_context *ev_ctx,
+                     struct messaging_context *msg_ctx);
 };
 
 NTSTATUS register_rpc_module(struct rpc_module_fns *fns,
@@ -39,9 +36,4 @@ bool setup_rpc_modules(struct tevent_context *ev_ctx,
 bool setup_rpc_module(struct tevent_context *ev_ctx,
                      struct messaging_context *msg_ctx,
                      const char *name);
-
-bool init_rpc_module(const char *name,
-                    const struct rpc_srv_callbacks *rpc_srv_cb);
-
-bool shutdown_rpc_module(const char *name);
 #endif