mirror of
https://github.com/signalwire/freeswitch.git
synced 2025-05-08 16:53:21 +00:00
remove redundant if (rep)
statement
This commit is contained in:
parent
a910c4f239
commit
86bcee0351
@ -8515,7 +8515,6 @@ void sofia_handle_sip_i_refer(nua_t *nua, sofia_profile_t *profile, nua_handle_t
|
|||||||
sip_replaces_t *replaces;
|
sip_replaces_t *replaces;
|
||||||
nua_handle_t *bnh = NULL;
|
nua_handle_t *bnh = NULL;
|
||||||
|
|
||||||
if (rep) {
|
|
||||||
const char *br_a = NULL, *br_b = NULL;
|
const char *br_a = NULL, *br_b = NULL;
|
||||||
char *buf;
|
char *buf;
|
||||||
char *p;
|
char *p;
|
||||||
@ -8896,12 +8895,10 @@ void sofia_handle_sip_i_refer(nua_t *nua, sofia_profile_t *profile, nua_handle_t
|
|||||||
const char *port = NULL;
|
const char *port = NULL;
|
||||||
const char *rep_h = NULL;
|
const char *rep_h = NULL;
|
||||||
|
|
||||||
|
|
||||||
switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), SWITCH_LOG_DEBUG,
|
switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), SWITCH_LOG_DEBUG,
|
||||||
"REFER from %s replaces %s (%s@%s) with %s on another server\n",
|
"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);
|
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) {
|
if (refer_to && refer_to->r_url->url_port) {
|
||||||
port = refer_to->r_url->url_port;
|
port = refer_to->r_url->url_port;
|
||||||
}
|
}
|
||||||
@ -8927,7 +8924,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-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);
|
switch_event_add_header_string(xml_params, SWITCH_STACK_BOTTOM, "refer-for-channel-id", br_a);
|
||||||
|
|
||||||
|
|
||||||
if (switch_xml_locate("channels", NULL, NULL, NULL,
|
if (switch_xml_locate("channels", NULL, NULL, NULL,
|
||||||
&xml_root, &xml_channel, xml_params, SWITCH_FALSE) == SWITCH_STATUS_SUCCESS) {
|
&xml_root, &xml_channel, xml_params, SWITCH_FALSE) == SWITCH_STATUS_SUCCESS) {
|
||||||
if ((params = switch_xml_child(xml_channel, "params"))) {
|
if ((params = switch_xml_child(xml_channel, "params"))) {
|
||||||
@ -8962,7 +8958,6 @@ void sofia_handle_sip_i_refer(nua_t *nua, sofia_profile_t *profile, nua_handle_t
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
if (zstr(exten)) {
|
if (zstr(exten)) {
|
||||||
exten = switch_core_session_sprintf(session, "sofia/%s/sip:%s@%s%s%s",
|
exten = switch_core_session_sprintf(session, "sofia/%s/sip:%s@%s%s%s",
|
||||||
profile->name, refer_to->r_url->url_user,
|
profile->name, refer_to->r_url->url_user,
|
||||||
@ -9071,9 +9066,6 @@ void sofia_handle_sip_i_refer(nua_t *nua, sofia_profile_t *profile, nua_handle_t
|
|||||||
TAG_END());
|
TAG_END());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} else {
|
|
||||||
switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), SWITCH_LOG_ERROR, "Cannot parse Replaces!\n");
|
|
||||||
}
|
|
||||||
goto done;
|
goto done;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user