From fdda1ea70f487871d003859cd3d9d13ef0cd512f Mon Sep 17 00:00:00 2001 From: Howard Chu Date: Mon, 23 Mar 2009 11:38:24 +0000 Subject: [PATCH] ITS#6030 don't reload already loaded modules --- servers/slapd/module.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/servers/slapd/module.c b/servers/slapd/module.c index 25f5f3ae92..ae796d6c69 100644 --- a/servers/slapd/module.c +++ b/servers/slapd/module.c @@ -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) { -- 2.39.5