[Freeswitch-trunk] [commit] r6248 - freeswitch/trunk/src/mod/applications/mod_limit
Freeswitch SVN
anthm at freeswitch.org
Tue Nov 13 17:05:02 EST 2007
Author: anthm
Date: Tue Nov 13 17:05:02 2007
New Revision: 6248
Modified:
freeswitch/trunk/src/mod/applications/mod_limit/mod_limit.c
Log:
fix some stuff and add set_user func
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 Tue Nov 13 17:05:02 2007
@@ -349,7 +349,7 @@
goto error;
}
- if (!strcasecmp(argv[0], "set")) {
+ if (!strcasecmp(argv[0], "insert")) {
if (argc < 4) {
goto error;
}
@@ -363,7 +363,16 @@
switch_safe_free(sql);
stream->write_function(stream, "+OK");
goto done;
- } else if (!strcasecmp(argv[0], "get")) {
+ } else if (!strcasecmp(argv[0], "delete")) {
+ if (argc < 2) {
+ goto error;
+ }
+ sql = switch_mprintf("delete from db_data where realm='%q' and data_key='%q'", argv[1], argv[2]);
+ assert(sql);
+ limit_execute_sql(sql, NULL);
+ switch_safe_free(sql);
+ stream->write_function(stream, "+OK");
+ } else if (!strcasecmp(argv[0], "select")) {
char buf[256] = "";
callback_t cbt = { 0 };
if (argc < 3) {
More information about the Freeswitch-trunk
mailing list