mirror of
https://github.com/signalwire/freeswitch.git
synced 2025-04-17 01:02:12 +00:00
fix small issue
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@7271 d0543943-73ff-0310-b7d9-9358b9ac24b2
This commit is contained in:
parent
c695685671
commit
bc44dd07ff
@ -1583,7 +1583,7 @@ uint8_t sofia_glue_negotiate_sdp(switch_core_session_t *session, sdp_session_t *
|
|||||||
crypto = attr->a_value;
|
crypto = attr->a_value;
|
||||||
crypto_tag = atoi(crypto);
|
crypto_tag = atoi(crypto);
|
||||||
|
|
||||||
if (tech_pvt->remote_crypto_key) {
|
if (tech_pvt->remote_crypto_key && switch_rtp_ready(tech_pvt->rtp_session)) {
|
||||||
if (crypto_tag && crypto_tag == tech_pvt->crypto_tag) {
|
if (crypto_tag && crypto_tag == tech_pvt->crypto_tag) {
|
||||||
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "Existing key is still valid.\n");
|
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "Existing key is still valid.\n");
|
||||||
} else {
|
} else {
|
||||||
@ -1594,9 +1594,12 @@ uint8_t sofia_glue_negotiate_sdp(switch_core_session_t *session, sdp_session_t *
|
|||||||
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "Change Remote key to [%s]\n", crypto);
|
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "Change Remote key to [%s]\n", crypto);
|
||||||
tech_pvt->remote_crypto_key = switch_core_session_strdup(tech_pvt->session, crypto);
|
tech_pvt->remote_crypto_key = switch_core_session_strdup(tech_pvt->session, crypto);
|
||||||
tech_pvt->crypto_tag = crypto_tag;
|
tech_pvt->crypto_tag = crypto_tag;
|
||||||
sofia_glue_add_crypto(tech_pvt, tech_pvt->remote_crypto_key, SWITCH_RTP_CRYPTO_RECV);
|
|
||||||
switch_rtp_add_crypto_key(tech_pvt->rtp_session, SWITCH_RTP_CRYPTO_RECV, tech_pvt->crypto_tag,
|
if (switch_rtp_ready(tech_pvt->rtp_session)) {
|
||||||
tech_pvt->crypto_type, tech_pvt->remote_raw_key, SWITCH_RTP_KEY_LEN);
|
sofia_glue_add_crypto(tech_pvt, tech_pvt->remote_crypto_key, SWITCH_RTP_CRYPTO_RECV);
|
||||||
|
switch_rtp_add_crypto_key(tech_pvt->rtp_session, SWITCH_RTP_CRYPTO_RECV, tech_pvt->crypto_tag,
|
||||||
|
tech_pvt->crypto_type, tech_pvt->remote_raw_key, SWITCH_RTP_KEY_LEN);
|
||||||
|
}
|
||||||
got_crypto++;
|
got_crypto++;
|
||||||
} else {
|
} else {
|
||||||
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "Ignoring unacceptable key\n");
|
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "Ignoring unacceptable key\n");
|
||||||
|
Loading…
x
Reference in New Issue
Block a user