diff options
Diffstat (limited to 'source4/smbd/process_single.c')
-rw-r--r-- | source4/smbd/process_single.c | 27 |
1 files changed, 21 insertions, 6 deletions
diff --git a/source4/smbd/process_single.c b/source4/smbd/process_single.c index 8f1362bed3..0c626e45c6 100644 --- a/source4/smbd/process_single.c +++ b/source4/smbd/process_single.c @@ -92,24 +92,39 @@ static int get_id(struct request_context *req) return (int)req->smb->pid; } +static void single_exit_server(struct server_context *smb, const char *reason) +{ + DEBUG(1,("single_exit_server: reason[%s]\n",reason)); +} + /* - initialise the single process model, registering ourselves with the model subsystem + initialise the single process model, registering ourselves with the process model subsystem */ -void process_model_single_init(void) +NTSTATUS process_model_single_init(void) { + NTSTATUS ret; struct model_ops ops; ZERO_STRUCT(ops); - + + /* fill in our name */ + ops.name = "single"; + /* fill in all the operations */ ops.model_startup = model_startup; ops.accept_connection = accept_connection; ops.accept_rpc_connection = accept_rpc_connection; ops.terminate_connection = terminate_connection; ops.terminate_rpc_connection = terminate_rpc_connection; - ops.exit_server = NULL; + ops.exit_server = single_exit_server; ops.get_id = get_id; - /* register ourselves with the process model subsystem. We register under the name 'single'. */ - register_process_model("single", &ops); + /* register ourselves with the PROCESS_MODEL subsystem. */ + ret = register_backend("process_model", &ops); + if (!NT_STATUS_IS_OK(ret)) { + DEBUG(0,("Failed to register process_model 'single'!\n")); + return ret; + } + + return ret; } |