提交 4f6d8881 authored 作者: Brian West's avatar Brian West

Here try this

上级 45162c15
......@@ -3497,12 +3497,12 @@ static void select_from_profile(sofia_profile_t *profile,
if (exclude_contact) {
sql = switch_mprintf("select contact, profile_name, '%q' "
"from sip_registrations where sip_user='%q' and (sip_host='%q' or presence_hosts like '%%%q%%') "
"and contact not like '%%%s%%'", (concat != NULL) ? concat : "", user, domain, domain, exclude_contact);
"from sip_registrations where (sip_user='%q' or sip_username='%q') and (sip_host='%q' or presence_hosts like '%%%q%%') "
"and contact not like '%%%s%%'", (concat != NULL) ? concat : "", user, user, domain, domain, exclude_contact);
} else {
sql = switch_mprintf("select contact, profile_name, '%q' "
"from sip_registrations where sip_user='%q' and (sip_host='%q' or presence_hosts like '%%%q%%')",
(concat != NULL) ? concat : "", user, domain, domain);
"from sip_registrations where (sip_user='%q' or sip_username='%q') and (sip_host='%q' or presence_hosts like '%%%q%%')",
(concat != NULL) ? concat : "", user, user, domain, domain);
}
switch_assert(sql);
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论