FS-6165 --resolve

Conflicts:
	src/mod/endpoints/mod_sofia/sofia_reg.c
This commit is contained in:
Anthony Minessale 2014-01-30 00:20:21 +05:00
parent f6cd2945a9
commit 26402b6a68
1 changed files with 9 additions and 5 deletions

View File

@ -1237,11 +1237,14 @@ uint8_t sofia_reg_handle_register(nua_t *nua, sofia_profile_t *profile, nua_hand
}
if (sip->sip_path) {
path_val = sip_header_as_string(nua_handle_home(nh), (void *) sip->sip_path);
path_encoded_len = (int)(strlen(path_val) * 3) + 1;
switch_zmalloc(path_encoded, path_encoded_len);
switch_copy_string(path_encoded, ";fs_path=", 10);
switch_url_encode(path_val, path_encoded + 9, path_encoded_len - 9);
if ((path_val = sip_header_as_string(nua_handle_home(nh), (void *) sip->sip_path))) {
char *path_stripped = sofia_glue_get_url_from_contact(path_val, SWITCH_TRUE);
path_val = path_stripped;
path_encoded_len = (int)(strlen(path_val) * 3) + 1;
switch_zmalloc(path_encoded, path_encoded_len);
switch_copy_string(path_encoded, ";fs_path=", 10);
switch_url_encode(path_val, path_encoded + 9, path_encoded_len - 9);
}
} else if (is_nat) {
char my_contact_str[1024];
if (sip->sip_contact->m_url->url_params) {
@ -1886,6 +1889,7 @@ uint8_t sofia_reg_handle_register(nua_t *nua, sofia_profile_t *profile, nua_hand
end:
switch_safe_free(dup_mwi_account);
switch_safe_free(path_val);
if (auth_params) {
switch_event_destroy(&auth_params);