From 8dccd213fb44a8e224362120f5eba1acace578b2 Mon Sep 17 00:00:00 2001 From: Anthony Minessale Date: Tue, 28 Jan 2014 21:55:56 +0500 Subject: [PATCH] FS-6085 --resolve --- src/mod/endpoints/mod_sofia/sofia_presence.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/mod/endpoints/mod_sofia/sofia_presence.c b/src/mod/endpoints/mod_sofia/sofia_presence.c index 138f4ff271..d38ded2927 100644 --- a/src/mod/endpoints/mod_sofia/sofia_presence.c +++ b/src/mod/endpoints/mod_sofia/sofia_presence.c @@ -3588,6 +3588,7 @@ void sofia_presence_handle_sip_i_subscribe(int status, const char *use_to_tag; char to_tag[13] = ""; char buf[80] = ""; + char *orig_to_user = NULL; if (!sip) { 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, '+')) { char *h; 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 (strrchr(p, '>')) { - new_contactstr = switch_mprintf("", to_user, p); + new_contactstr = switch_mprintf("", orig_to_user, p); } }