diff --git a/src/mod/endpoints/mod_verto/ws.c b/src/mod/endpoints/mod_verto/ws.c index f33ce57239..be2fd8296c 100644 --- a/src/mod/endpoints/mod_verto/ws.c +++ b/src/mod/endpoints/mod_verto/ws.c @@ -42,7 +42,7 @@ void deinit_ssl(void) } #else -static unsigned long pthreads_thread_id(void); +static void pthreads_thread_id(CRYPTO_THREADID *id); static void pthreads_locking_callback(int mode, int type, const char *file, int line); static pthread_mutex_t *lock_cs; @@ -62,7 +62,7 @@ static void thread_setup(void) pthread_mutex_init(&(lock_cs[i]), NULL); } - CRYPTO_set_id_callback(pthreads_thread_id); + CRYPTO_THREADID_set_callback(pthreads_thread_id); CRYPTO_set_locking_callback(pthreads_locking_callback); } @@ -93,9 +93,9 @@ static void pthreads_locking_callback(int mode, int type, const char *file, int -static unsigned long pthreads_thread_id(void) +static void pthreads_thread_id(CRYPTO_THREADID *id) { - return (unsigned long) pthread_self(); + CRYPTO_THREADID_set_numeric(id, (unsigned long)pthread_self()); } diff --git a/src/mod/xml_int/mod_xml_rpc/ws.c b/src/mod/xml_int/mod_xml_rpc/ws.c index a5ad9c7a3b..b660b644f6 100644 --- a/src/mod/xml_int/mod_xml_rpc/ws.c +++ b/src/mod/xml_int/mod_xml_rpc/ws.c @@ -19,7 +19,7 @@ void deinit_ssl(void) } #else -static unsigned long pthreads_thread_id(void); +static void pthreads_thread_id(CRYPTO_THREADID *id); static void pthreads_locking_callback(int mode, int type, const char *file, int line); static pthread_mutex_t *lock_cs; @@ -39,7 +39,7 @@ static void thread_setup(void) pthread_mutex_init(&(lock_cs[i]), NULL); } - CRYPTO_set_id_callback(pthreads_thread_id); + CRYPTO_THREADID_set_callback(pthreads_thread_id); CRYPTO_set_locking_callback(pthreads_locking_callback); } @@ -70,9 +70,9 @@ static void pthreads_locking_callback(int mode, int type, const char *file, int -static unsigned long pthreads_thread_id(void) +static void pthreads_thread_id(CRYPTO_THREADID *id) { - return (unsigned long) pthread_self(); + CRYPTO_THREADID_set_numeric(id, (unsigned long)pthread_self()); } diff --git a/src/switch_core_cert.c b/src/switch_core_cert.c index 0cc992b9ed..393baa55a9 100644 --- a/src/switch_core_cert.c +++ b/src/switch_core_cert.c @@ -46,9 +46,9 @@ static inline void switch_ssl_ssl_lock_callback(int mode, int type, char *file, } } -static inline unsigned long switch_ssl_ssl_thread_id(void) +static inline void switch_ssl_ssl_thread_id(CRYPTO_THREADID *id) { - return (unsigned long) switch_thread_self(); + CRYPTO_THREADID_set_numeric(id, (unsigned long)switch_thread_self()); } SWITCH_DECLARE(void) switch_ssl_init_ssl_locks(void) @@ -69,7 +69,7 @@ SWITCH_DECLARE(void) switch_ssl_init_ssl_locks(void) switch_assert(ssl_mutexes[i] != NULL); } - CRYPTO_set_id_callback(switch_ssl_ssl_thread_id); + CRYPTO_THREADID_set_callback(switch_ssl_ssl_thread_id); CRYPTO_set_locking_callback((void (*)(int, int, const char*, int))switch_ssl_ssl_lock_callback); }