From 0f8eeb81ec109cde681961614fb690f8373fa9c6 Mon Sep 17 00:00:00 2001 From: Andrew Bartlett Date: Mon, 4 Feb 2008 21:58:29 +1100 Subject: Remove useless layer of indirection, where every service called task_service_init() manually. Now this is called from service.c for all services. Andrew Bartlett (This used to be commit 9c9a4731cafd0dcf6c8523a7b06759cd4f14e4db) --- source4/wrepl_server/wrepl_server.c | 19 +++++-------------- 1 file changed, 5 insertions(+), 14 deletions(-) (limited to 'source4/wrepl_server') diff --git a/source4/wrepl_server/wrepl_server.c b/source4/wrepl_server/wrepl_server.c index d13482dd98..e750d9355a 100644 --- a/source4/wrepl_server/wrepl_server.c +++ b/source4/wrepl_server/wrepl_server.c @@ -453,6 +453,10 @@ static void wreplsrv_task_init(struct task_server *task) NTSTATUS status; struct wreplsrv_service *service; + if (!lp_wins_support(task->lp_ctx)) { + return; + } + task_server_set_title(task, "task[wreplsrv]"); service = talloc_zero(task, struct wreplsrv_service); @@ -501,23 +505,10 @@ static void wreplsrv_task_init(struct task_server *task) irpc_add_name(task->msg_ctx, "wrepl_server"); } -/* - initialise the WREPL server - */ -static NTSTATUS wreplsrv_init(struct event_context *event_ctx, struct loadparm_context *lp_ctx, const struct model_ops *model_ops) -{ - if (!lp_wins_support(lp_ctx)) { - return NT_STATUS_OK; - } - - return task_server_startup(event_ctx, lp_ctx, "wrepl", - model_ops, wreplsrv_task_init); -} - /* register ourselves as a available server */ NTSTATUS server_service_wrepl_init(void) { - return register_server_service("wrepl", wreplsrv_init); + return register_server_service("wrepl", wreplsrv_task_init); } -- cgit