FS-2936 remove unused functions
This commit is contained in:
parent
64f04023a1
commit
1ee867444d
|
@ -253,8 +253,6 @@ struct switch_runtime {
|
||||||
int multiple_registrations;
|
int multiple_registrations;
|
||||||
uint32_t max_db_handles;
|
uint32_t max_db_handles;
|
||||||
uint32_t db_handle_timeout;
|
uint32_t db_handle_timeout;
|
||||||
int curl_count;
|
|
||||||
int ssl_count;
|
|
||||||
int cpu_count;
|
int cpu_count;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -436,9 +436,6 @@ SWITCH_DECLARE(void) switch_core_session_rwunlock(_In_ switch_core_session_t *se
|
||||||
*/
|
*/
|
||||||
SWITCH_DECLARE(int) switch_core_add_state_handler(_In_ const switch_state_handler_table_t *state_handler);
|
SWITCH_DECLARE(int) switch_core_add_state_handler(_In_ const switch_state_handler_table_t *state_handler);
|
||||||
|
|
||||||
SWITCH_DECLARE(int) switch_core_curl_count(int *val);
|
|
||||||
SWITCH_DECLARE(int) switch_core_ssl_count(int *val);
|
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
\brief Remove a global state handler
|
\brief Remove a global state handler
|
||||||
\param state_handler the state handler to remove
|
\param state_handler the state handler to remove
|
||||||
|
|
|
@ -36,7 +36,7 @@
|
||||||
|
|
||||||
static switch_mutex_t **ssl_mutexes;
|
static switch_mutex_t **ssl_mutexes;
|
||||||
static switch_memory_pool_t *ssl_pool = NULL;
|
static switch_memory_pool_t *ssl_pool = NULL;
|
||||||
|
static int ssl_count = 0;
|
||||||
|
|
||||||
static inline void switch_ssl_ssl_lock_callback(int mode, int type, char *file, int line)
|
static inline void switch_ssl_ssl_lock_callback(int mode, int type, char *file, int line)
|
||||||
{
|
{
|
||||||
|
@ -56,7 +56,6 @@ static inline unsigned long switch_ssl_ssl_thread_id(void)
|
||||||
static inline void switch_ssl_init_ssl_locks(void)
|
static inline void switch_ssl_init_ssl_locks(void)
|
||||||
{
|
{
|
||||||
|
|
||||||
int ssl_count = switch_core_ssl_count(NULL);
|
|
||||||
int i, num;
|
int i, num;
|
||||||
|
|
||||||
if (ssl_count == 0) {
|
if (ssl_count == 0) {
|
||||||
|
@ -77,17 +76,13 @@ static inline void switch_ssl_init_ssl_locks(void)
|
||||||
}
|
}
|
||||||
|
|
||||||
ssl_count++;
|
ssl_count++;
|
||||||
switch_core_ssl_count(&ssl_count);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static inline void switch_ssl_destroy_ssl_locks()
|
static inline void switch_ssl_destroy_ssl_locks()
|
||||||
{
|
{
|
||||||
int i;
|
int i;
|
||||||
int ssl_count = switch_core_ssl_count(NULL);
|
|
||||||
|
|
||||||
ssl_count--;
|
if (ssl_count == 1) {
|
||||||
|
|
||||||
if (ssl_count == 0) {
|
|
||||||
CRYPTO_set_locking_callback(NULL);
|
CRYPTO_set_locking_callback(NULL);
|
||||||
for (i = 0; i < CRYPTO_num_locks(); i++) {
|
for (i = 0; i < CRYPTO_num_locks(); i++) {
|
||||||
if (ssl_mutexes[i]) {
|
if (ssl_mutexes[i]) {
|
||||||
|
@ -96,10 +91,8 @@ static inline void switch_ssl_destroy_ssl_locks()
|
||||||
}
|
}
|
||||||
|
|
||||||
OPENSSL_free(ssl_mutexes);
|
OPENSSL_free(ssl_mutexes);
|
||||||
|
ssl_count--;
|
||||||
}
|
}
|
||||||
|
|
||||||
switch_core_ssl_count(&ssl_count);
|
|
||||||
|
|
||||||
}
|
}
|
||||||
#else
|
#else
|
||||||
static inline void switch_ssl_init_ssl_locks(void) { return; }
|
static inline void switch_ssl_init_ssl_locks(void) { return; }
|
||||||
|
|
|
@ -200,33 +200,6 @@ SWITCH_DECLARE(FILE *) switch_core_data_channel(switch_text_channel_t channel)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
SWITCH_DECLARE(int) switch_core_curl_count(int *val)
|
|
||||||
{
|
|
||||||
if (!val) {
|
|
||||||
switch_mutex_lock(runtime.global_mutex);
|
|
||||||
return runtime.curl_count;
|
|
||||||
}
|
|
||||||
|
|
||||||
runtime.curl_count = *val;
|
|
||||||
switch_mutex_unlock(runtime.global_mutex);
|
|
||||||
return 0;
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
SWITCH_DECLARE(int) switch_core_ssl_count(int *val)
|
|
||||||
{
|
|
||||||
if (!val) {
|
|
||||||
switch_mutex_lock(runtime.global_mutex);
|
|
||||||
return runtime.ssl_count;
|
|
||||||
}
|
|
||||||
|
|
||||||
runtime.ssl_count = *val;
|
|
||||||
switch_mutex_unlock(runtime.global_mutex);
|
|
||||||
return 0;
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
SWITCH_DECLARE(void) switch_core_remove_state_handler(const switch_state_handler_table_t *state_handler)
|
SWITCH_DECLARE(void) switch_core_remove_state_handler(const switch_state_handler_table_t *state_handler)
|
||||||
{
|
{
|
||||||
int index, tmp_index = 0;
|
int index, tmp_index = 0;
|
||||||
|
|
Loading…
Reference in New Issue