Merge branch 'master' of git://git.samba.org/samba
[kai/samba.git] / source4 / smbd / process_model.c
index f83c7b784bcbee8d5da60de0db66acad2744542b..e3ea4dbf39d74ea91d4ba002fc0116bad1ac8c71 100644 (file)
 
 #include "includes.h"
 #include "smbd/process_model.h"
-#include "build.h"
+#include "param/param.h"
+
+static const struct model_ops *process_model_byname(const char *name);
 
 /*
   setup the events for the chosen process model
 */
-_PUBLIC_ const struct model_ops *process_model_startup(struct event_context *ev, const char *model)
+_PUBLIC_ const struct model_ops *process_model_startup(struct tevent_context *ev, const char *model)
 {
        const struct model_ops *ops;
 
@@ -79,10 +81,14 @@ _PUBLIC_ NTSTATUS register_process_model(const void *_ops)
        return NT_STATUS_OK;
 }
 
-NTSTATUS process_model_init(void)
+_PUBLIC_ NTSTATUS process_model_init(struct loadparm_context *lp_ctx)
 {
-       init_module_fn static_init[] = STATIC_process_model_MODULES;
-       init_module_fn *shared_init = load_samba_modules(NULL, "process_model");
+       extern NTSTATUS process_model_thread_init(void);
+       extern NTSTATUS process_model_standard_init(void);
+       extern NTSTATUS process_model_prefork_init(void);
+       extern NTSTATUS process_model_single_init(void);
+       init_module_fn static_init[] = { STATIC_process_model_MODULES };
+       init_module_fn *shared_init = load_samba_modules(NULL, lp_ctx, "process_model");
 
        run_init_functions(static_init);
        run_init_functions(shared_init);
@@ -95,7 +101,7 @@ NTSTATUS process_model_init(void)
 /*
   return the operations structure for a named backend of the specified type
 */
-const struct model_ops *process_model_byname(const char *name)
+static const struct model_ops *process_model_byname(const char *name)
 {
        int i;