提交 7c7967fb authored 作者: Anthony Minessale's avatar Anthony Minessale

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

上级 175b6b22
...@@ -5217,6 +5217,8 @@ char *sofia_glue_get_url_from_contact(char *buf, uint8_t to_dup) ...@@ -5217,6 +5217,8 @@ char *sofia_glue_get_url_from_contact(char *buf, uint8_t to_dup)
{ {
char *url = NULL, *e; char *url = NULL, *e;
switch_assert(buf);
while(*buf == ' ') { while(*buf == ' ') {
buf++; buf++;
} }
......
...@@ -1851,6 +1851,11 @@ static void _send_presence_notify(sofia_profile_t *profile, ...@@ -1851,6 +1851,11 @@ static void _send_presence_notify(sofia_profile_t *profile,
char *contact_str, *contact, *user_via = NULL; char *contact_str, *contact, *user_via = NULL;
char *route_uri = NULL, *o_contact_dup = NULL, *tmp, *to_uri, *dcs = NULL; char *route_uri = NULL, *o_contact_dup = NULL, *tmp, *to_uri, *dcs = NULL;
const char *tp; 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; tmp = (char *)o_contact;
o_contact_dup = sofia_glue_get_url_from_contact(tmp, 1); o_contact_dup = sofia_glue_get_url_from_contact(tmp, 1);
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论