lib/util: consolidate module loading into common code
[samba.git] / source4 / ntptr / ntptr_base.c
index a7004be90ba289a25f8e6e0ca912be4870098da1..3fe8960602a35dd7b135caeb4e08ed3fa67d3535 100644 (file)
@@ -25,6 +25,7 @@
 #include "includes.h"
 #include "ntptr/ntptr.h"
 #include "param/param.h"
+#include "lib/util/samba_modules.h"
 
 /* the list of currently registered NTPTR backends */
 static struct ntptr_backend {
@@ -68,11 +69,12 @@ NTSTATUS ntptr_register(const void *_ops)
        return NT_STATUS_OK;
 }
 
-NTSTATUS ntptr_init(struct loadparm_context *lp_ctx)
+NTSTATUS ntptr_init(void)
 {
-       extern NTSTATUS ntptr_simple_ldb_init(void);
+#define _MODULE_PROTO(init) extern NTSTATUS init(void);
+       STATIC_ntptr_MODULES_PROTO;
        init_module_fn static_init[] = { STATIC_ntptr_MODULES };
-       init_module_fn *shared_init = load_samba_modules(NULL, lp_ctx, "ntptr");
+       init_module_fn *shared_init = load_samba_modules(NULL, "ntptr");
 
        run_init_functions(static_init);
        run_init_functions(shared_init);
@@ -119,7 +121,7 @@ const struct ntptr_critical_sizes *ntptr_interface_version(void)
 /*
   create a ntptr_context with a specified NTPTR backend
 */
-NTSTATUS ntptr_init_context(TALLOC_CTX *mem_ctx, struct event_context *ev_ctx,
+NTSTATUS ntptr_init_context(TALLOC_CTX *mem_ctx, struct tevent_context *ev_ctx,
                            struct loadparm_context *lp_ctx,
                            const char *providor, struct ntptr_context **_ntptr)
 {