Rework service init functions to pass down service name. This is
authorAndrew Bartlett <abartlet@samba.org>
Mon, 4 Feb 2008 06:48:51 +0000 (17:48 +1100)
committerAndrew Bartlett <abartlet@samba.org>
Mon, 4 Feb 2008 06:48:51 +0000 (17:48 +1100)
needed to change prefork behaviour based on what service is being
started.

Andrew Bartlett and David Disseldorp

source/cldap_server/cldap_server.c
source/dsdb/repl/drepl_service.c
source/kdc/kdc.c
source/ldap_server/ldap_server.c
source/nbt_server/nbt_server.c
source/rpc_server/service_rpc.c
source/smb_server/smb_server.c
source/smbd/service_task.c
source/web_server/web_server.c
source/winbind/wb_server.c
source/wrepl_server/wrepl_server.c

index d68637104db3b5eea582e7d9053dbd8e7dacb78a..944d679a2d5d546e45413fd688c502ed0f2a17c0 100644 (file)
@@ -209,7 +209,7 @@ static void cldapd_task_init(struct task_server *task)
  */
 static NTSTATUS cldapd_init(struct event_context *event_ctx, struct loadparm_context *lp_ctx, const struct model_ops *model_ops)
 {
-       return task_server_startup(event_ctx, lp_ctx, model_ops, cldapd_task_init);
+       return task_server_startup(event_ctx, lp_ctx, "cldap", model_ops, cldapd_task_init);
 }
 
 
index e212407e2406483920b15bee9b6a8b9cdddf9a2e..246309e16f4ba32663af48619fc90f7219f13eeb 100644 (file)
@@ -185,7 +185,7 @@ static void dreplsrv_task_init(struct task_server *task)
  */
 static NTSTATUS dreplsrv_init(struct event_context *event_ctx, struct loadparm_context *lp_ctx, const struct model_ops *model_ops)
 {
-       return task_server_startup(event_ctx, lp_ctx, model_ops, dreplsrv_task_init);
+       return task_server_startup(event_ctx, lp_ctx, "drepl", model_ops, dreplsrv_task_init);
 }
 
 /*
index 04e7ddd2ff1ceef58087fdb89f9333936366c76f..d820f0abe97668b14f304d9c3e908591745bf11b 100644 (file)
@@ -667,7 +667,7 @@ static NTSTATUS kdc_init(struct event_context *event_ctx,
                         struct loadparm_context *lp_ctx,
                         const struct model_ops *model_ops)
 {      
-       return task_server_startup(event_ctx, lp_ctx, model_ops, kdc_task_init);
+       return task_server_startup(event_ctx, lp_ctx, "kdc", model_ops, kdc_task_init);
 }
 
 /* called at smbd startup - register ourselves as a server service */
index 8380775c287dfd6a580ab88b390733c0a4dee981..f9c763eec781257f2f8d812bd5d07d8b10e86342 100644 (file)
@@ -584,7 +584,7 @@ static NTSTATUS ldapsrv_init(struct event_context *event_context,
                             struct loadparm_context *lp_ctx,
                             const struct model_ops *model_ops)
 {      
-       return task_server_startup(event_context, lp_ctx, model_ops, 
+       return task_server_startup(event_context, lp_ctx, "ldap", model_ops, 
                                   ldapsrv_task_init);
 }
 
index 1718ef7f2e0e1788b0fc6bbf94453b4e96f557eb..bcdc63e984dbfe3610fa4748c3b85bad2e62f9c6 100644 (file)
@@ -93,7 +93,7 @@ static void nbtd_task_init(struct task_server *task)
  */
 static NTSTATUS nbtd_init(struct event_context *event_ctx, struct loadparm_context *lp_ctx, const struct model_ops *model_ops)
 {
-       return task_server_startup(event_ctx, lp_ctx, 
+       return task_server_startup(event_ctx, lp_ctx, "nbt",
                                   model_ops, nbtd_task_init);
 }
 
index 46916135f9a4799e6f53739910657eb791ae0869..855e120cede1b7e8d2ab11ed80a8b59078150544 100644 (file)
@@ -465,7 +465,7 @@ static NTSTATUS dcesrv_init(struct event_context *event_context,
                            struct loadparm_context *lp_ctx,
                            const struct model_ops *model_ops)
 {      
-       return task_server_startup(event_context, lp_ctx, 
+       return task_server_startup(event_context, lp_ctx, "rpc",
                                   model_ops, dcesrv_task_init);
 }
 
index cbff585e21af8b91bf45f0567d95b262093a7d57..866ae26fa46f44bde2ebd3a71e9b0af136d69916 100644 (file)
@@ -258,7 +258,7 @@ static NTSTATUS smbsrv_init(struct event_context *event_context,
                            struct loadparm_context *lp_ctx,
                            const struct model_ops *model_ops)
 {      
-       return task_server_startup(event_context, lp_ctx, 
+       return task_server_startup(event_context, lp_ctx, "smb",
                                   model_ops, smbsrv_task_init);
 }
 
index 08588464cc8343398fbef4fbf349c411e390131b..22746850590af7125de16f5506274551d0000246 100644 (file)
@@ -85,6 +85,7 @@ static void task_server_callback(struct event_context *event_ctx,
 */
 NTSTATUS task_server_startup(struct event_context *event_ctx, 
                             struct loadparm_context *lp_ctx,
+                            const char *service_name, 
                             const struct model_ops *model_ops, 
                             void (*task_init)(struct task_server *))
 {
@@ -96,7 +97,7 @@ NTSTATUS task_server_startup(struct event_context *event_ctx,
        state->task_init = task_init;
        state->model_ops = model_ops;
        
-       model_ops->new_task(event_ctx, lp_ctx, task_server_callback, state);
+       model_ops->new_task(event_ctx, lp_ctx, service_name, task_server_callback, state);
 
        return NT_STATUS_OK;
 }
index 9ff67f78f30da7458ee44af090b91d2154af3e0a..bd212cff7d28df7fcaa37c7703a2f0b60fad60c4 100644 (file)
@@ -298,7 +298,7 @@ static NTSTATUS websrv_init(struct event_context *event_context,
                            struct loadparm_context *lp_ctx,
                            const struct model_ops *model_ops)
 {      
-       return task_server_startup(event_context, lp_ctx, 
+       return task_server_startup(event_context, lp_ctx, "web", 
                                   model_ops, websrv_task_init);
 }
 
index eaba6609f30cd5c825f8625bf490b06a5cdc40ef..9acde4a557cb31bfa2a30f5584c7a99c4e9d20fd 100644 (file)
@@ -208,7 +208,7 @@ static NTSTATUS winbind_init(struct event_context *event_ctx,
                             struct loadparm_context *lp_ctx,
                             const struct model_ops *model_ops)
 {
-       return task_server_startup(event_ctx, lp_ctx, 
+       return task_server_startup(event_ctx, lp_ctx, "winbind",
                                   model_ops, winbind_task_init);
 }
 
index 50ef7e8550d8c7c2d86345f0393560f6f21499d6..d13482dd98d036452aad293706a08b533ccf1fa8 100644 (file)
@@ -510,7 +510,7 @@ static NTSTATUS wreplsrv_init(struct event_context *event_ctx, struct loadparm_c
                return NT_STATUS_OK;
        }
 
-       return task_server_startup(event_ctx, lp_ctx, 
+       return task_server_startup(event_ctx, lp_ctx, "wrepl", 
                                   model_ops, wreplsrv_task_init);
 }