mirror of
https://github.com/signalwire/freeswitch.git
synced 2025-04-13 15:50:59 +00:00
Attempt to fix limit counter bug
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@12879 d0543943-73ff-0310-b7d9-9358b9ac24b2
This commit is contained in:
parent
a6065fb411
commit
2ccace5a41
@ -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);
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user