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;
|
||||
nua_handle_t *bnh = NULL;
|
||||
|
||||
if (rep) {
|
||||
const char *br_a = NULL, *br_b = NULL;
|
||||
char *buf;
|
||||
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 *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;
|
||||
}
|
||||
|
@ -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-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"))) {
|
||||
|
@ -8962,7 +8958,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,
|
||||
|
@ -9071,9 +9066,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;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue