forked from Mirrors/freeswitch
Change limit query to allow for sql wildcard in query
you can now do things like <application="limit" data="realm id 2"/> <application="limit" data="realm % 10"/> this will allow both individual extension limits and realm limits git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@7250 d0543943-73ff-0310-b7d9-9358b9ac24b2
This commit is contained in:
parent
a6ecfa36a7
commit
1121c2724e
@ -616,7 +616,7 @@ SWITCH_STANDARD_APP(limit_function)
|
||||
|
||||
cbt.buf = buf;
|
||||
cbt.len = sizeof(buf);
|
||||
sql = switch_mprintf("select count(hostname) from limit_data where realm='%q' and id='%q'", realm, id);
|
||||
sql = switch_mprintf("select count(hostname) from limit_data where realm='%q' and id like '%q'", realm, id);
|
||||
limit_execute_sql_callback(NULL, sql, sql2str_callback, &cbt);
|
||||
got = atoi(buf);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user