FS-6165 --resolve

This commit is contained in:
Anthony Minessale 2014-01-30 00:20:21 +05:00
parent 85d6b9af87
commit a21cbf8142
1 changed files with 9 additions and 5 deletions

View File

@ -1336,11 +1336,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 (uparams) {
@ -2039,6 +2042,7 @@ uint8_t sofia_reg_handle_register(nua_t *nua, sofia_profile_t *profile, nua_hand
switch_safe_free(display_m);
switch_safe_free(dup_mwi_account);
switch_safe_free(utmp);
switch_safe_free(path_val);
if (auth_params) {
switch_event_destroy(&auth_params);