mirror of
https://github.com/signalwire/freeswitch.git
synced 2025-03-13 12:40:17 +00:00
FS-3847 --resolve
This commit is contained in:
parent
09ad887948
commit
20737713ec
@ -5139,15 +5139,22 @@ char *sofia_glue_get_url_from_contact(char *buf, uint8_t to_dup)
|
|||||||
{
|
{
|
||||||
char *url = NULL, *e;
|
char *url = NULL, *e;
|
||||||
|
|
||||||
while((e = strchr(buf, '"'))) {
|
while(*buf == ' ') {
|
||||||
buf = e+1;
|
buf++;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (*buf == '"') {
|
||||||
|
buf++;
|
||||||
|
while((e = strchr(buf, '"'))) {
|
||||||
|
buf = e+1;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
while(*buf == ' ') {
|
while(*buf == ' ') {
|
||||||
buf++;
|
buf++;
|
||||||
}
|
}
|
||||||
|
|
||||||
if ((url = strchr(buf, '<')) && (e = strchr(url, '>'))) {
|
if ((url = strchr(buf, '<')) && (e = switch_find_end_paren(url, '<', '>'))) {
|
||||||
url++;
|
url++;
|
||||||
if (to_dup) {
|
if (to_dup) {
|
||||||
url = strdup(url);
|
url = strdup(url);
|
||||||
|
@ -1811,7 +1811,11 @@ static void _send_presence_notify(sofia_profile_t *profile,
|
|||||||
dst = sofia_glue_get_destination((char *) o_contact);
|
dst = sofia_glue_get_destination((char *) o_contact);
|
||||||
switch_assert(dst);
|
switch_assert(dst);
|
||||||
|
|
||||||
contact = sofia_glue_get_url_from_contact(dst->contact, 1);
|
if (!zstr(dst->contact)) {
|
||||||
|
contact = sofia_glue_get_url_from_contact(dst->contact, 1);
|
||||||
|
} else {
|
||||||
|
contact = strdup(o_contact);
|
||||||
|
}
|
||||||
|
|
||||||
if (dst->route_uri) {
|
if (dst->route_uri) {
|
||||||
route_uri = sofia_glue_strip_uri(dst->route_uri);
|
route_uri = sofia_glue_strip_uri(dst->route_uri);
|
||||||
@ -1864,7 +1868,7 @@ static void _send_presence_notify(sofia_profile_t *profile,
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
switch_mutex_lock(profile->ireg_mutex);
|
switch_mutex_lock(profile->ireg_mutex);
|
||||||
if (!profile->cseq_base) {
|
if (!profile->cseq_base) {
|
||||||
profile->cseq_base = (now - 1312693200) * 10;
|
profile->cseq_base = (now - 1312693200) * 10;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user