diff options
| author | Jelmer Vernooij <jelmer@samba.org> | 2002-10-31 18:08:45 +0000 | 
|---|---|---|
| committer | Jelmer Vernooij <jelmer@samba.org> | 2002-10-31 18:08:45 +0000 | 
| commit | fb6c6ec09ef2203eba93e90336d225265c4a7d9f (patch) | |
| tree | 27e6ddcf158fef53dffbaa632e7fd56f87489fb6 | |
| parent | bf1ec6db9959132c1cc509dc2cc6fe15ac61a529 (diff) | |
| download | samba-fb6c6ec09ef2203eba93e90336d225265c4a7d9f.tar.gz samba-fb6c6ec09ef2203eba93e90336d225265c4a7d9f.tar.bz2 samba-fb6c6ec09ef2203eba93e90336d225265c4a7d9f.zip  | |
add smb_load_modules() to load a list of modules - does this function look ok ?
(This used to be commit a82dbb3c22e6cb2096efb87c12a6006642806aac)
| -rw-r--r-- | source3/lib/module.c | 22 | 
1 files changed, 22 insertions, 0 deletions
diff --git a/source3/lib/module.c b/source3/lib/module.c index f05a68b493..2d8bd7459f 100644 --- a/source3/lib/module.c +++ b/source3/lib/module.c @@ -53,6 +53,22 @@ NTSTATUS smb_load_module(const char *module_name)  	return nt_status;  } +/* Load all modules in list and return number of  + * modules that has been successfully loaded */ +int smb_load_modules(const char **modules) +{ +	int i; +	int success = 0; + +	for(i = 0; modules[i]; i++){ +		if(NT_STATUS_IS_OK(smb_load_module(modules[i]))) { +			success++; +		} +	} + +	return success; +} +  #else /* HAVE_DLOPEN */  NTSTATUS smb_load_module(const char *module_name) @@ -61,4 +77,10 @@ NTSTATUS smb_load_module(const char *module_name)  	return NT_STATUS_NOT_SUPPORTED;  } +int smb_load_modules(const char **modules) +{ +	DEBUG(0,("This samba executable has not been build with plugin support")); +	return -1; +} +  #endif /* HAVE_DLOPEN */  | 
