diff options
author | Jelmer Vernooij <jelmer@samba.org> | 2003-02-20 22:26:28 +0000 |
---|---|---|
committer | Jelmer Vernooij <jelmer@samba.org> | 2003-02-20 22:26:28 +0000 |
commit | 8d8a8c9633ea04d269d70b1fa8f4393cc73f7bbd (patch) | |
tree | 3bc7add2e13dac3e4e6a671efe524afaee4e6e44 /source3/lib | |
parent | 1009ef3e37c82682e9c2c4c63bc7407420f20af8 (diff) | |
download | samba-8d8a8c9633ea04d269d70b1fa8f4393cc73f7bbd.tar.gz samba-8d8a8c9633ea04d269d70b1fa8f4393cc73f7bbd.tar.bz2 samba-8d8a8c9633ea04d269d70b1fa8f4393cc73f7bbd.zip |
Make init_module() and thus smb_load_module() return an int.
modules/developer.c: init_module() should return an int
(This used to be commit 7f59703550378ff2333e3c851bf1a77037510abd)
Diffstat (limited to 'source3/lib')
-rw-r--r-- | source3/lib/module.c | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/source3/lib/module.c b/source3/lib/module.c index 6febe8a9f1..dd94f79950 100644 --- a/source3/lib/module.c +++ b/source3/lib/module.c @@ -22,11 +22,11 @@ #include "includes.h" #ifdef HAVE_DLOPEN -NTSTATUS smb_load_module(const char *module_name) +int smb_load_module(const char *module_name) { void *handle; init_module_function *init; - NTSTATUS nt_status; + int status; const char *error; /* Always try to use LAZY symbol resolving; if the plugin has @@ -37,7 +37,7 @@ NTSTATUS smb_load_module(const char *module_name) if(!handle) { DEBUG(0, ("Error loading module '%s': %s\n", module_name, sys_dlerror())); - return NT_STATUS_UNSUCCESSFUL; + return False; } init = sys_dlsym(handle, "init_module"); @@ -47,14 +47,14 @@ NTSTATUS smb_load_module(const char *module_name) error = sys_dlerror(); if (error) { DEBUG(0, ("Error trying to resolve symbol 'init_module' in %s: %s\n", module_name, error)); - return NT_STATUS_UNSUCCESSFUL; + return False; } - nt_status = init(); + status = init(); DEBUG(2, ("Module '%s' loaded\n", module_name)); - return nt_status; + return status; } /* Load all modules in list and return number of @@ -65,7 +65,7 @@ int smb_load_modules(const char **modules) int success = 0; for(i = 0; modules[i]; i++){ - if(NT_STATUS_IS_OK(smb_load_module(modules[i]))) { + if(smb_load_module(modules[i])) { success++; } } @@ -77,10 +77,10 @@ int smb_load_modules(const char **modules) #else /* HAVE_DLOPEN */ -NTSTATUS smb_load_module(const char *module_name) +int smb_load_module(const char *module_name) { DEBUG(0,("This samba executable has not been build with plugin support")); - return NT_STATUS_NOT_SUPPORTED; + return False; } int smb_load_modules(const char **modules) |