Author: anthm Date: Fri Dec 1 11:08:56 2006 New Revision: 3506 Modified: freeswitch/trunk/src/switch_loadable_module.c Log: prevent double load of modules Modified: freeswitch/trunk/src/switch_loadable_module.c ============================================================================== --- freeswitch/trunk/src/switch_loadable_module.c (original) +++ freeswitch/trunk/src/switch_loadable_module.c Fri Dec 1 11:08:56 2006 @@ -380,7 +380,12 @@ snprintf(path, len, "%s%s%s%s", dir, SWITCH_PATH_SEPARATOR, file, ext); } } - + + if (switch_core_hash_find(loadable_modules.module_hash, file)) { + switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_WARNING, "Module %s Already Loaded!\n", file); + return SWITCH_STATUS_FALSE; + } + if ((status = switch_loadable_module_load_file(path, &new_module) == SWITCH_STATUS_SUCCESS)) { return switch_loadable_module_process((char *) file, new_module); } else {
participants (1)
-
Freeswitch SVN