]> git.ipfire.org Git - thirdparty/freeswitch.git/commitdiff
init ssl locks in sofia
authorAnthony Minessale <anthm@freeswitch.org>
Mon, 23 May 2011 17:23:30 +0000 (12:23 -0500)
committerAnthony Minessale <anthm@freeswitch.org>
Mon, 23 May 2011 17:23:30 +0000 (12:23 -0500)
src/mod/endpoints/mod_sofia/mod_sofia.c

index c9ea6790b7e2867d4f0b0742fdb03c0dde4954b3..c258e62dd7f84729d2d03f0df9c3b3e730de4f76 100644 (file)
@@ -37,6 +37,8 @@
 /*************************************************************************************************************************************************************/
 #include "mod_sofia.h"
 #include "sofia-sip/sip_extra.h"
+#include <switch_ssl.h>
+
 SWITCH_MODULE_LOAD_FUNCTION(mod_sofia_load);
 SWITCH_MODULE_SHUTDOWN_FUNCTION(mod_sofia_shutdown);
 SWITCH_MODULE_DEFINITION(mod_sofia, mod_sofia_load, mod_sofia_shutdown, NULL);
@@ -4951,6 +4953,8 @@ 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;
@@ -5154,6 +5158,8 @@ 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;
 }