]> git.ipfire.org Git - thirdparty/freeswitch.git/commitdiff
FS-9058 [mod_hiredis] allow auto decrement of non-interval limits on channel hangup.
authorChris Rienzo <chris.rienzo@citrix.com>
Tue, 12 Apr 2016 14:39:09 +0000 (10:39 -0400)
committerChris Rienzo <chris.rienzo@citrix.com>
Tue, 12 Apr 2016 14:39:09 +0000 (10:39 -0400)
src/mod/applications/mod_hiredis/mod_hiredis.c

index 1085f189c3f8209770102266275760e048ba19fd..4c4597e9a8ae1990b9e81a16fb9df8698f4e0ead 100644 (file)
@@ -203,7 +203,7 @@ SWITCH_LIMIT_RELEASE(hiredis_limit_release)
                        profile = switch_core_hash_find(mod_hiredis_globals.profiles, limit_pvt->realm);
                        hashkey = switch_mprintf("decr %s", tmp->limit_key);
 
-                       if ( tmp && (tmp->interval > 0) && (hiredis_profile_execute_sync(profile, hashkey, &response) != SWITCH_STATUS_SUCCESS)) {
+                       if ( 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",
                                                                  tmp->realm, hashkey, response);
                        }