FS-6085 --resolve

This commit is contained in:
Anthony Minessale 2014-01-28 21:55:56 +05:00
parent 27d6d08772
commit 8dccd213fb

View File

@ -3588,6 +3588,7 @@ void sofia_presence_handle_sip_i_subscribe(int status,
const char *use_to_tag; const char *use_to_tag;
char to_tag[13] = ""; char to_tag[13] = "";
char buf[80] = ""; char buf[80] = "";
char *orig_to_user = NULL;
if (!sip) { if (!sip) {
return; return;
@ -3713,6 +3714,8 @@ void sofia_presence_handle_sip_i_subscribe(int status,
} }
} }
orig_to_user = su_strdup(nua_handle_home(nh), to_user);
if (to_user && strchr(to_user, '+')) { if (to_user && strchr(to_user, '+')) {
char *h; char *h;
if ((proto = (d_user = strdup(to_user)))) { if ((proto = (d_user = strdup(to_user)))) {
@ -3922,9 +3925,9 @@ void sofia_presence_handle_sip_i_subscribe(int status,
if (contactstr && (p = strchr(contactstr, '@'))) { if (contactstr && (p = strchr(contactstr, '@'))) {
if (strrchr(p, '>')) { if (strrchr(p, '>')) {
new_contactstr = switch_mprintf("<sip:%s%s", to_user, p); new_contactstr = switch_mprintf("<sip:%s%s", orig_to_user, p);
} else { } else {
new_contactstr = switch_mprintf("<sip:%s%s>", to_user, p); new_contactstr = switch_mprintf("<sip:%s%s>", orig_to_user, p);
} }
} }