mirror of
https://git.openldap.org/openldap/openldap.git
synced 2025-01-06 10:46:21 +08:00
ITS#6030 don't reload already loaded modules
This commit is contained in:
parent
ae3fb6acfa
commit
fdda1ea70f
@ -119,7 +119,7 @@ int module_unload( const char *file_name )
|
||||
|
||||
int module_load(const char* file_name, int argc, char *argv[])
|
||||
{
|
||||
module_loaded_t *module = NULL;
|
||||
module_loaded_t *module;
|
||||
const char *error;
|
||||
int rc;
|
||||
MODULE_INIT_FN initialize;
|
||||
@ -129,6 +129,11 @@ int module_load(const char* file_name, int argc, char *argv[])
|
||||
#define file file_name
|
||||
#endif
|
||||
|
||||
/* silently ignore attempts to load a module that's already present */
|
||||
module = module_handle( file_name );
|
||||
if ( module )
|
||||
return 0;
|
||||
|
||||
module = (module_loaded_t *)ch_calloc(1, sizeof(module_loaded_t) +
|
||||
strlen(file_name));
|
||||
if (module == NULL) {
|
||||
|
Loading…
Reference in New Issue
Block a user