提交 0651b01a authored 作者: Jeff Lenk's avatar Jeff Lenk

correct sofia_count_reg_function behavior reported from user list

上级 114f0578
...@@ -3616,12 +3616,12 @@ SWITCH_STANDARD_API(sofia_count_reg_function) ...@@ -3616,12 +3616,12 @@ SWITCH_STANDARD_API(sofia_count_reg_function)
if (zstr(user)) { if (zstr(user)) {
sql = switch_mprintf("select count(*) " sql = switch_mprintf("select count(*) "
"from sip_registrations where (sip_host='%q' or presence_hosts like '%%%q%%')", "from sip_registrations where (sip_host='%q' or presence_hosts like '%%%q%%')",
(concat != NULL) ? concat : "", domain, domain); domain, domain);
} else { } else {
sql = switch_mprintf("select count(*) " sql = switch_mprintf("select count(*) "
"from sip_registrations where (sip_user='%q' or dir_user='%q') and (sip_host='%q' or presence_hosts like '%%%q%%')", "from sip_registrations where sip_user='%q' and (sip_host='%q' or presence_hosts like '%%%q%%')",
(concat != NULL) ? concat : "", user, user, domain, domain); user, domain, domain);
} }
switch_assert(sql); switch_assert(sql);
sofia_glue_execute_sql_callback(profile, profile->ireg_mutex, sql, sql2str_callback, &cb); sofia_glue_execute_sql_callback(profile, profile->ireg_mutex, sql, sql2str_callback, &cb);
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论