git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@7860 d0543943-73ff-0310-b7d9-9358b9ac24b2
This commit is contained in:
Anthony Minessale 2008-03-11 18:33:49 +00:00
parent 576c0c98fb
commit a5f825ce89
1 changed files with 3 additions and 7 deletions

View File

@ -684,7 +684,7 @@ char *sofia_overcome_sip_uri_weakness(switch_core_session_t *session, const char
if (strchr(stripped, ';')) { if (strchr(stripped, ';')) {
if (params) { if (params) {
new_uri = switch_core_session_sprintf(session, "%s%s&transport=%s&%s%s", new_uri = switch_core_session_sprintf(session, "%s%s&transport=%s;%s%s",
uri_only ? "" : "<", stripped, sofia_glue_transport2str(transport), params, uri_only ? "" : ">"); uri_only ? "" : "<", stripped, sofia_glue_transport2str(transport), params, uri_only ? "" : ">");
} else { } else {
new_uri = switch_core_session_sprintf(session, "%s%s&transport=%s%s", new_uri = switch_core_session_sprintf(session, "%s%s&transport=%s%s",
@ -692,7 +692,7 @@ char *sofia_overcome_sip_uri_weakness(switch_core_session_t *session, const char
} }
} else { } else {
if (params) { if (params) {
new_uri = switch_core_session_sprintf(session, "%s%s;transport=%s&%s%s", new_uri = switch_core_session_sprintf(session, "%s%s;transport=%s;%s%s",
uri_only ? "" : "<", stripped, sofia_glue_transport2str(transport), params, uri_only ? "" : ">"); uri_only ? "" : "<", stripped, sofia_glue_transport2str(transport), params, uri_only ? "" : ">");
} else { } else {
new_uri = switch_core_session_sprintf(session, "%s%s;transport=%s%s", new_uri = switch_core_session_sprintf(session, "%s%s;transport=%s%s",
@ -702,11 +702,7 @@ char *sofia_overcome_sip_uri_weakness(switch_core_session_t *session, const char
} }
} else { } else {
if (params) { if (params) {
if (strchr(stripped, ';')) {
new_uri = switch_core_session_sprintf(session, "%s&%s", stripped, params);
} else {
new_uri = switch_core_session_sprintf(session, "%s;%s", stripped, params); new_uri = switch_core_session_sprintf(session, "%s;%s", stripped, params);
}
} else { } else {
new_uri = stripped; new_uri = stripped;
} }