mirror of
https://git.openldap.org/openldap/openldap.git
synced 2025-12-24 00:29:35 -05:00
ITS#6030 don't reload already loaded modules
This commit is contained in:
parent
ae3fb6acfa
commit
fdda1ea70f
1 changed files with 6 additions and 1 deletions
|
|
@ -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 a new issue