FS-4055 --resolve this was caused by corrupted db data, this patch will prevent it in the future
This commit is contained in:
parent
175b6b223a
commit
7c7967fbae
|
@ -5217,6 +5217,8 @@ char *sofia_glue_get_url_from_contact(char *buf, uint8_t to_dup)
|
|||
{
|
||||
char *url = NULL, *e;
|
||||
|
||||
switch_assert(buf);
|
||||
|
||||
while(*buf == ' ') {
|
||||
buf++;
|
||||
}
|
||||
|
|
|
@ -1851,6 +1851,11 @@ static void _send_presence_notify(sofia_profile_t *profile,
|
|||
char *contact_str, *contact, *user_via = NULL;
|
||||
char *route_uri = NULL, *o_contact_dup = NULL, *tmp, *to_uri, *dcs = NULL;
|
||||
const char *tp;
|
||||
|
||||
if (zstr(full_to) || zstr(full_from) || zstr(o_contact) || zstr(expires) || zstr(ct) || zstr(pl)) {
|
||||
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_WARNING, "MISSING DATA TO SEND NOTIFY.\n");
|
||||
return;
|
||||
}
|
||||
|
||||
tmp = (char *)o_contact;
|
||||
o_contact_dup = sofia_glue_get_url_from_contact(tmp, 1);
|
||||
|
|
Loading…
Reference in New Issue