From: Mathieu Rene Date: Wed, 1 Apr 2009 23:28:29 +0000 (+0000) Subject: Attempt to fix limit counter bug X-Git-Tag: v1.0.4~1300 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=2ccace5a413a0df655ffa0d7b5f7e42dd18818e7;p=thirdparty%2Ffreeswitch.git Attempt to fix limit counter bug git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@12879 d0543943-73ff-0310-b7d9-9358b9ac24b2 --- diff --git a/src/mod/applications/mod_limit/mod_limit.c b/src/mod/applications/mod_limit/mod_limit.c index fd03ff7689..bde6e7c713 100644 --- a/src/mod/applications/mod_limit/mod_limit.c +++ b/src/mod/applications/mod_limit/mod_limit.c @@ -315,7 +315,7 @@ static switch_status_t db_state_handler(switch_core_session_t *session) 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 @@ static switch_status_t hash_state_handler(switch_core_session_t *session) 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);