summaryrefslogtreecommitdiff
path: root/source4/smbd
diff options
context:
space:
mode:
authorAndrew Tridgell <tridge@samba.org>2010-10-30 23:42:27 +1100
committerAndrew Tridgell <tridge@samba.org>2010-10-30 13:32:09 +0000
commitb4ba669e48f7dd213d530a24f4587dea93c84223 (patch)
treee98e79947df9cd03d6b5867e9bc969bed146200e /source4/smbd
parent35d466e66b464cefca2e33fa8e1ff7301b029690 (diff)
downloadsamba-b4ba669e48f7dd213d530a24f4587dea93c84223.tar.gz
samba-b4ba669e48f7dd213d530a24f4587dea93c84223.tar.bz2
samba-b4ba669e48f7dd213d530a24f4587dea93c84223.zip
s4-smbd: initialise process models in smbtorture before use
the spoolss notify test needs to setup the process models before use Autobuild-User: Andrew Tridgell <tridge@samba.org> Autobuild-Date: Sat Oct 30 13:32:09 UTC 2010 on sn-devel-104
Diffstat (limited to 'source4/smbd')
-rw-r--r--source4/smbd/process_model.c16
1 files changed, 11 insertions, 5 deletions
diff --git a/source4/smbd/process_model.c b/source4/smbd/process_model.c
index 0e63605460..3d5e2ce229 100644
--- a/source4/smbd/process_model.c
+++ b/source4/smbd/process_model.c
@@ -108,13 +108,19 @@ _PUBLIC_ NTSTATUS process_model_init(struct loadparm_context *lp_ctx)
extern NTSTATUS process_model_prefork_init(void);
extern NTSTATUS process_model_onefork_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");
+ static bool initialised;
- run_init_functions(static_init);
- run_init_functions(shared_init);
+ if (!initialised) {
+ init_module_fn static_init[] = { STATIC_process_model_MODULES };
+ init_module_fn *shared_init;
+ initialised = true;
+ shared_init = load_samba_modules(NULL, lp_ctx, "process_model");
- talloc_free(shared_init);
+ run_init_functions(static_init);
+ run_init_functions(shared_init);
+
+ talloc_free(shared_init);
+ }
return NT_STATUS_OK;
}