From 8d8a8c9633ea04d269d70b1fa8f4393cc73f7bbd Mon Sep 17 00:00:00 2001 From: Jelmer Vernooij Date: Thu, 20 Feb 2003 22:26:28 +0000 Subject: 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) --- source3/lib/module.c | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) (limited to 'source3/lib') 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) -- cgit