Merge pull request #1077 in FS/freeswitch from ~STEPHALNET/freeswitch:FS-9777 to master

* commit '86bcee03518ff5ecbb7bae8e78f3821b4027ad09':
  remove redundant `if (rep)` statement
This commit is contained in:
Brian West 2016-12-02 11:44:04 -06:00
commit c9a05d7e60
1 changed files with 500 additions and 508 deletions

View File

@ -8516,7 +8516,6 @@ void sofia_handle_sip_i_refer(nua_t *nua, sofia_profile_t *profile, nua_handle_t
sip_replaces_t *replaces;
nua_handle_t *bnh = NULL;
if (rep) {
const char *br_a = NULL, *br_b = NULL;
char *buf;
char *p;
@ -8897,12 +8896,10 @@ void sofia_handle_sip_i_refer(nua_t *nua, sofia_profile_t *profile, nua_handle_t
const char *port = NULL;
const char *rep_h = NULL;
switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), SWITCH_LOG_DEBUG,
"REFER from %s replaces %s (%s@%s) with %s on another server\n",
switch_core_session_get_uuid(session), rep, exten, (char *) refer_to->r_url->url_host, br_a);
if (refer_to && refer_to->r_url->url_port) {
port = refer_to->r_url->url_port;
}
@ -8928,7 +8925,6 @@ void sofia_handle_sip_i_refer(nua_t *nua, sofia_profile_t *profile, nua_handle_t
switch_event_add_header_string(xml_params, SWITCH_STACK_BOTTOM, "refer-from-channel-id", switch_core_session_get_uuid(session));
switch_event_add_header_string(xml_params, SWITCH_STACK_BOTTOM, "refer-for-channel-id", br_a);
if (switch_xml_locate("channels", NULL, NULL, NULL,
&xml_root, &xml_channel, xml_params, SWITCH_FALSE) == SWITCH_STATUS_SUCCESS) {
if ((params = switch_xml_child(xml_channel, "params"))) {
@ -8963,7 +8959,6 @@ void sofia_handle_sip_i_refer(nua_t *nua, sofia_profile_t *profile, nua_handle_t
}
if (zstr(exten)) {
exten = switch_core_session_sprintf(session, "sofia/%s/sip:%s@%s%s%s",
profile->name, refer_to->r_url->url_user,
@ -9072,9 +9067,6 @@ void sofia_handle_sip_i_refer(nua_t *nua, sofia_profile_t *profile, nua_handle_t
TAG_END());
}
}
} else {
switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), SWITCH_LOG_ERROR, "Cannot parse Replaces!\n");
}
goto done;
}