[core,mod_verto,mod_xml_rpc] Fix use of deprecated CRYPTO_set_id_callback().

This commit is contained in:
Andrey Volk 2020-03-28 14:38:47 +04:00
parent bc9515468e
commit 865de72cee
3 changed files with 11 additions and 11 deletions

View File

@ -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());
}

View File

@ -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());
}

View File

@ -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);
}