return 0;
}
+ if (!crypto) {
+ return 0;
+ }
engine = &session->media_handle->engines[type];
for (i = 0; smh->crypto_suite_order[i] != CRYPTO_INVALID; i++) {
if (engine->ssec[engine->crypto_type].remote_crypto_key && switch_rtp_ready(engine->rtp_session)) {
/* Compare all the key. The tag may remain the same even if key changed */
- if (crypto && engine->crypto_type != CRYPTO_INVALID && !strcmp(crypto, engine->ssec[engine->crypto_type].remote_crypto_key)) {
+ if (engine->crypto_type != CRYPTO_INVALID && !strcmp(crypto, engine->ssec[engine->crypto_type].remote_crypto_key)) {
switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), SWITCH_LOG_DEBUG, "Existing key is still valid.\n");
got_crypto = 1;
} else {
switch_channel_get_name(session->channel), switch_channel_get_name(other_channel));
switch_core_session_rwunlock(other_session);
- pass = 0;
match = 0;
fmatch = 0;
goto done;
vmatch = 0;
almost_vmatch = 0;
- nm_idx = 0;
m_idx = 0;
memset(matches, 0, sizeof(matches[0]) * MAX_MATCHES);
memset(near_matches, 0, sizeof(near_matches[0]) * MAX_MATCHES);
int cur_ptime = 0, this_ptime = 0, cng_type = 0;
const char *mult;
- i = 0;
if (!switch_media_handle_test_media_flag(smh, SCMF_SUPPRESS_CNG) && smh->mparams->cng_pt && use_cng) {
cng_type = smh->mparams->cng_pt;
if (switch_channel_direction(channel) == SWITCH_CALL_DIRECTION_INBOUND || prefer_sdp) {
for (map = m->m_rtpmaps; map; map = map->rm_next) {
- match = 0;
if (map->rm_pt > 127 || already_did[map->rm_pt]) {
continue;
continue;
}
for (map = m->m_rtpmaps; map; map = map->rm_next) {
- match = 0;
if (map->rm_pt > 127 || already_did[map->rm_pt]) {
continue;
if (switch_channel_direction(channel) == SWITCH_CALL_DIRECTION_INBOUND || prefer_sdp) {
for (map = m->m_rtpmaps; map; map = map->rm_next) {
- match = 0;
if (map->rm_pt > 127 || already_did[map->rm_pt]) {
continue;
}
for (map = m->m_rtpmaps; map; map = map->rm_next) {
- match = 0;
if (map->rm_pt > 127 || already_did[map->rm_pt]) {
continue;
enc_frame->ssrc = frame->ssrc;
enc_frame->payload = enc_frame->codec->implementation->ianacode;
write_frame = enc_frame;
- status = SWITCH_STATUS_SUCCESS;
break;
case SWITCH_STATUS_NOT_INITALIZED:
switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), SWITCH_LOG_ERROR, "Codec init error!\n");
enc_frame->ssrc = frame->ssrc;
enc_frame->payload = enc_frame->codec->implementation->ianacode;
write_frame = enc_frame;
- status = SWITCH_STATUS_SUCCESS;
break;
case SWITCH_STATUS_NOT_INITALIZED:
switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), SWITCH_LOG_ERROR, "Codec init error!\n");