[core] print SRTP lib version at init.

This commit is contained in:
Dragos Oancea 2021-09-25 11:11:46 +00:00 committed by Andrey Volk
parent 5aacf41f14
commit bb7bf86bb9
1 changed files with 8 additions and 1 deletions

View File

@ -1533,7 +1533,14 @@ SWITCH_DECLARE(void) switch_rtp_init(switch_memory_pool_t *pool)
}
#endif
#ifdef ENABLE_SRTP
srtp_init();
{
srtp_err_status_t stat = srtp_init();
if (stat == srtp_err_status_ok) {
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "SRTP (%s) initialized.\n", srtp_get_version_string());
} else {
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "Error initializing SRTP (%d).\n", stat);
}
}
#endif
switch_mutex_init(&port_lock, SWITCH_MUTEX_NESTED, pool);
switch_rtp_dtls_init();