FS-4055 --resolve this was caused by corrupted db data, this patch will prevent it in the future

This commit is contained in:
Anthony Minessale 2012-03-29 10:07:34 -05:00
parent 175b6b223a
commit 7c7967fbae
2 changed files with 7 additions and 0 deletions

View File

@ -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++;
}

View File

@ -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);