diff options
author | Jelmer Vernooij <jelmer@samba.org> | 2008-02-09 20:06:54 +0100 |
---|---|---|
committer | Jelmer Vernooij <jelmer@samba.org> | 2008-02-09 20:06:54 +0100 |
commit | ec106a14216ee034b7e04c177c89703e63dfd107 (patch) | |
tree | 59c56cd663ee3dc03d0ce63bf4405ee87c14834a /source4/smbd/service.c | |
parent | 4075a2ba982ea56ff925e0a33839f0760fd71911 (diff) | |
parent | 1a2544a24c064e9eecb973439ccd0e7126e06e77 (diff) | |
download | samba-ec106a14216ee034b7e04c177c89703e63dfd107.tar.gz samba-ec106a14216ee034b7e04c177c89703e63dfd107.tar.bz2 samba-ec106a14216ee034b7e04c177c89703e63dfd107.zip |
Merge branch 'v4-0-trivial' into v4-0-python
(This used to be commit b874f07175ae38a041f53f0e4ac6a4050dcefeae)
Diffstat (limited to 'source4/smbd/service.c')
-rw-r--r-- | source4/smbd/service.c | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/source4/smbd/service.c b/source4/smbd/service.c index 525b245616..2b1fcc4bd8 100644 --- a/source4/smbd/service.c +++ b/source4/smbd/service.c @@ -30,20 +30,20 @@ static struct registered_server { struct registered_server *next, *prev; const char *service_name; - NTSTATUS (*service_init)(struct event_context *, struct loadparm_context *lp_ctx, const struct model_ops *); + void (*task_init)(struct task_server *); } *registered_servers; /* register a server service. */ NTSTATUS register_server_service(const char *name, - NTSTATUS (*service_init)(struct event_context *, struct loadparm_context *lp_ctx, const struct model_ops *)) + void (*task_init)(struct task_server *)) { struct registered_server *srv; srv = talloc(talloc_autofree_context(), struct registered_server); NT_STATUS_HAVE_NO_MEMORY(srv); srv->service_name = name; - srv->service_init = service_init; + srv->task_init = task_init; DLIST_ADD_END(registered_servers, srv, struct registered_server *); return NT_STATUS_OK; } @@ -53,14 +53,15 @@ NTSTATUS register_server_service(const char *name, initialise a server service */ static NTSTATUS server_service_init(const char *name, - struct event_context *event_ctx, + struct event_context *event_context, struct loadparm_context *lp_ctx, const struct model_ops *model_ops) { struct registered_server *srv; for (srv=registered_servers; srv; srv=srv->next) { if (strcasecmp(name, srv->service_name) == 0) { - return srv->service_init(event_ctx, lp_ctx, model_ops); + return task_server_startup(event_context, lp_ctx, srv->service_name, + model_ops, srv->task_init); } } return NT_STATUS_INVALID_SYSTEM_SERVICE; |