static struct rpc_module_fns rpc_module_mdssvc_fns = {
.setup = rpc_setup_mdssvc,
- .init = NULL,
- .shutdown = NULL
};
static_decl_rpc;
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;
-}
#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,
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