From b978d39d48c42de9e4c93db94ae569369b0f656d Mon Sep 17 00:00:00 2001 From: Anthony Minessale Date: Wed, 25 May 2011 14:45:55 -0500 Subject: [PATCH] FS-3312 --resolve --- src/include/switch_curl.h | 7 ------- src/mod/endpoints/mod_dingaling/mod_dingaling.c | 6 ------ src/mod/endpoints/mod_sofia/mod_sofia.c | 5 ----- src/switch_core.c | 4 ++++ 4 files changed, 4 insertions(+), 18 deletions(-) diff --git a/src/include/switch_curl.h b/src/include/switch_curl.h index 3820ba8693..4d44595e0d 100644 --- a/src/include/switch_curl.h +++ b/src/include/switch_curl.h @@ -40,9 +40,6 @@ static inline void switch_curl_init(void) if (curl_count == 0) { curl_global_init(CURL_GLOBAL_ALL); -#if defined(HAVE_OPENSSL) - switch_ssl_init_ssl_locks(); -#endif } curl_count++; @@ -56,10 +53,6 @@ static inline void switch_curl_destroy() curl_count--; if (curl_count == 0) { - -#if defined(HAVE_OPENSSL) - switch_ssl_destroy_ssl_locks(); -#endif curl_global_cleanup(); } switch_core_curl_count(&curl_count); diff --git a/src/mod/endpoints/mod_dingaling/mod_dingaling.c b/src/mod/endpoints/mod_dingaling/mod_dingaling.c index 2db3660ccd..59d76d110b 100644 --- a/src/mod/endpoints/mod_dingaling/mod_dingaling.c +++ b/src/mod/endpoints/mod_dingaling/mod_dingaling.c @@ -30,7 +30,6 @@ * */ #include -#include #include #include @@ -1912,9 +1911,6 @@ SWITCH_MODULE_LOAD_FUNCTION(mod_dingaling_load) SWITCH_ADD_API(api_interface, "dingaling", "DingaLing Menu", dingaling, DINGALING_SYNTAX); SWITCH_ADD_CHAT(chat_interface, MDL_CHAT_PROTO, chat_send); - switch_ssl_init_ssl_locks(); - - /* indicate that the module should continue to be loaded */ return SWITCH_STATUS_SUCCESS; } @@ -2012,8 +2008,6 @@ SWITCH_MODULE_SHUTDOWN_FUNCTION(mod_dingaling_shutdown) switch_safe_free(globals.codec_string); switch_safe_free(globals.codec_rates_string); - switch_ssl_destroy_ssl_locks(); - return SWITCH_STATUS_SUCCESS; } diff --git a/src/mod/endpoints/mod_sofia/mod_sofia.c b/src/mod/endpoints/mod_sofia/mod_sofia.c index 2c1da9441a..99c00424dc 100644 --- a/src/mod/endpoints/mod_sofia/mod_sofia.c +++ b/src/mod/endpoints/mod_sofia/mod_sofia.c @@ -37,7 +37,6 @@ /*************************************************************************************************************************************************************/ #include "mod_sofia.h" #include "sofia-sip/sip_extra.h" -#include SWITCH_MODULE_LOAD_FUNCTION(mod_sofia_load); SWITCH_MODULE_SHUTDOWN_FUNCTION(mod_sofia_shutdown); @@ -4953,8 +4952,6 @@ SWITCH_MODULE_LOAD_FUNCTION(mod_sofia_load) switch_management_interface_t *management_interface; struct in_addr in; - switch_ssl_init_ssl_locks(); - memset(&mod_sofia_globals, 0, sizeof(mod_sofia_globals)); mod_sofia_globals.destroy_private.destroy_nh = 1; mod_sofia_globals.destroy_private.is_static = 1; @@ -5158,8 +5155,6 @@ SWITCH_MODULE_SHUTDOWN_FUNCTION(mod_sofia_shutdown) switch_core_hash_destroy(&mod_sofia_globals.gateway_hash); switch_mutex_unlock(mod_sofia_globals.hash_mutex); - switch_ssl_destroy_ssl_locks(); - return SWITCH_STATUS_SUCCESS; } diff --git a/src/switch_core.c b/src/switch_core.c index b0c983cab5..a770d8cf93 100644 --- a/src/switch_core.c +++ b/src/switch_core.c @@ -36,6 +36,7 @@ #include +#include #include #include #include @@ -1473,6 +1474,7 @@ SWITCH_DECLARE(switch_status_t) switch_core_init(switch_core_flag_t flags, switc switch_uuid_get(&uuid); switch_uuid_format(runtime.uuid_str, &uuid); + switch_ssl_init_ssl_locks(); return SWITCH_STATUS_SUCCESS; } @@ -2145,6 +2147,8 @@ SWITCH_DECLARE(switch_status_t) switch_core_destroy(void) switch_loadable_module_shutdown(); + switch_ssl_destroy_ssl_locks(); + if (switch_test_flag((&runtime), SCF_USE_SQL)) { switch_core_sqldb_stop(); }