mirror of
https://github.com/signalwire/freeswitch.git
synced 2025-05-19 14:08:15 +00:00
Merge pull request #768 in FS/freeswitch from ~PHIL.LAVIN/freeswitch:bugfix/FS-8978-mod-hiredis-fix-decr to master
* commit 'a1ee1a03bf0b9ff045e3a1b94f479e86c37f1274': FS-8978: [mod_redis] Fix limit counter not decrementing on hangup
This commit is contained in:
commit
e33c7df9c0
@ -197,13 +197,14 @@ SWITCH_LIMIT_RELEASE(hiredis_limit_release)
|
|||||||
while (tmp) {
|
while (tmp) {
|
||||||
profile = switch_core_hash_find(mod_hiredis_globals.profiles, limit_pvt->realm);
|
profile = switch_core_hash_find(mod_hiredis_globals.profiles, limit_pvt->realm);
|
||||||
hashkey = switch_mprintf("decr %s", tmp->limit_key);
|
hashkey = switch_mprintf("decr %s", tmp->limit_key);
|
||||||
limit_pvt = tmp->next;
|
|
||||||
|
|
||||||
if ( limit_pvt && (limit_pvt->interval > 0) && (hiredis_profile_execute_sync(profile, hashkey, &response) != SWITCH_STATUS_SUCCESS)) {
|
if ( limit_pvt && (limit_pvt->interval > 0) && (hiredis_profile_execute_sync(profile, hashkey, &response) != SWITCH_STATUS_SUCCESS)) {
|
||||||
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "hiredis: profile[%s] error executing [%s] because [%s]\n",
|
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "hiredis: profile[%s] error executing [%s] because [%s]\n",
|
||||||
tmp->realm, hashkey, response);
|
tmp->realm, hashkey, response);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
limit_pvt = tmp->next;
|
||||||
|
|
||||||
tmp = limit_pvt;
|
tmp = limit_pvt;
|
||||||
switch_safe_free(response);
|
switch_safe_free(response);
|
||||||
switch_safe_free(hashkey);
|
switch_safe_free(hashkey);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user