mirror of
https://github.com/signalwire/freeswitch.git
synced 2025-03-12 20:27:19 +00:00
don't use callback for delete stmt
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@14879 d0543943-73ff-0310-b7d9-9358b9ac24b2
This commit is contained in:
parent
eb33af5465
commit
25585417ab
@ -911,19 +911,11 @@ SWITCH_STANDARD_APP(limit_function)
|
|||||||
static void limit_release(switch_core_session_t *session, const char *realm, const char *id)
|
static void limit_release(switch_core_session_t *session, const char *realm, const char *id)
|
||||||
{
|
{
|
||||||
char *sql = NULL;
|
char *sql = NULL;
|
||||||
char buf[80] = "";
|
|
||||||
callback_t cbt = { 0 };
|
|
||||||
|
|
||||||
switch_mutex_lock(globals.mutex);
|
|
||||||
|
|
||||||
cbt.buf = buf;
|
|
||||||
cbt.len = sizeof(buf);
|
|
||||||
sql = switch_mprintf("delete from limit_data where uuid='%q' and realm='%q' and id like '%q'",
|
sql = switch_mprintf("delete from limit_data where uuid='%q' and realm='%q' and id like '%q'",
|
||||||
switch_core_session_get_uuid(session), realm, id);
|
switch_core_session_get_uuid(session), realm, id);
|
||||||
limit_execute_sql_callback(NULL, sql, sql2str_callback, &cbt);
|
limit_execute_sql(sql, globals.mutex);
|
||||||
switch_safe_free(sql);
|
switch_safe_free(sql);
|
||||||
|
|
||||||
switch_mutex_unlock(globals.mutex);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
#define LIMITEXECUTE_USAGE "<realm> <id> [<max>] [application] [application arguments]"
|
#define LIMITEXECUTE_USAGE "<realm> <id> [<max>] [application] [application arguments]"
|
||||||
|
Loading…
x
Reference in New Issue
Block a user