[Freeswitch-svn] [commit] r7250 - freeswitch/trunk/src/mod/applications/mod_limit

Freeswitch SVN silik0n at freeswitch.org
Wed Jan 16 15:16:38 EST 2008


Author: silik0n
Date: Wed Jan 16 15:16:37 2008
New Revision: 7250

Modified:
   freeswitch/trunk/src/mod/applications/mod_limit/mod_limit.c

Log:
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



Modified: freeswitch/trunk/src/mod/applications/mod_limit/mod_limit.c
==============================================================================
--- freeswitch/trunk/src/mod/applications/mod_limit/mod_limit.c	(original)
+++ freeswitch/trunk/src/mod/applications/mod_limit/mod_limit.c	Wed Jan 16 15:16:37 2008
@@ -616,7 +616,7 @@
 
     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);
 



More information about the Freeswitch-svn mailing list