summaryrefslogtreecommitdiff
path: root/source4/ntvfs/ntvfs_base.c
diff options
context:
space:
mode:
authorJelmer Vernooij <jelmer@samba.org>2007-12-11 22:23:25 +0100
committerStefan Metzmacher <metze@samba.org>2007-12-21 05:49:34 +0100
commit28671c54cf154131ca6b601cac283933664829c7 (patch)
tree520f3f36038c8999968ec4333d810d8891143270 /source4/ntvfs/ntvfs_base.c
parent70f1f33af8e6e82506d0ee9ff6cc7e0923a7d0a1 (diff)
downloadsamba-28671c54cf154131ca6b601cac283933664829c7.tar.gz
samba-28671c54cf154131ca6b601cac283933664829c7.tar.bz2
samba-28671c54cf154131ca6b601cac283933664829c7.zip
r26403: Make sure ntvfs is only initialized once.
(This used to be commit 32b44e10747d704ce9a21cb8d34606cb0e41efab)
Diffstat (limited to 'source4/ntvfs/ntvfs_base.c')
-rw-r--r--source4/ntvfs/ntvfs_base.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/source4/ntvfs/ntvfs_base.c b/source4/ntvfs/ntvfs_base.c
index 3873afbdfa..28f43eabe8 100644
--- a/source4/ntvfs/ntvfs_base.c
+++ b/source4/ntvfs/ntvfs_base.c
@@ -201,8 +201,14 @@ NTSTATUS ntvfs_init_connection(TALLOC_CTX *mem_ctx, struct share_config *scfg, e
NTSTATUS ntvfs_init(struct loadparm_context *lp_ctx)
{
+ static bool initialized = false;
init_module_fn static_init[] = STATIC_ntvfs_MODULES;
- init_module_fn *shared_init = load_samba_modules(NULL, lp_ctx, "ntvfs");
+ init_module_fn *shared_init;
+
+ if (initialized) return NT_STATUS_OK;
+ initialized = true;
+
+ shared_init = load_samba_modules(NULL, lp_ctx, "ntvfs");
run_init_functions(static_init);
run_init_functions(shared_init);