[Freeswitch-svn] [commit] r12879 - freeswitch/trunk/src/mod/applications/mod_limit
FreeSWITCH SVN
mrene at freeswitch.org
Wed Apr 1 16:28:29 PDT 2009
Author: mrene
Date: Wed Apr 1 18:28:29 2009
New Revision: 12879
Log:
Attempt to fix limit counter bug
Modified:
freeswitch/trunk/src/mod/applications/mod_limit/mod_limit.c
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 Apr 1 18:28:29 2009
@@ -315,7 +315,7 @@
switch_channel_state_t state = switch_channel_get_state(channel);
char *sql = NULL;
- if (state == CS_HANGUP || state == CS_ROUTING) {
+ if (state >= CS_HANGUP || state == CS_ROUTING) {
sql = switch_mprintf("delete from limit_data where uuid='%q';",
switch_core_session_get_uuid(session));
limit_execute_sql(sql, globals.mutex);
@@ -334,7 +334,7 @@
limit_hash_private_t *pvt = switch_channel_get_private(channel, "limit_hash");
/* The call is either hung up, or is going back into the dialplan, decrement appropriate couters */
- if (state == CS_HANGUP || state == CS_ROUTING) {
+ if (state >= CS_HANGUP || state == CS_ROUTING) {
switch_hash_index_t *hi;
switch_mutex_lock(globals.limit_hash_mutex);
More information about the Freeswitch-svn
mailing list