From: Chris Rienzo Date: Tue, 12 Apr 2016 14:39:09 +0000 (-0400) Subject: FS-9058 [mod_hiredis] allow auto decrement of non-interval limits on channel hangup. X-Git-Tag: v1.6.8~5^2~22 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=f69fef88b77f9c3074c00f09ba78d632ea978a6c;p=thirdparty%2Ffreeswitch.git FS-9058 [mod_hiredis] allow auto decrement of non-interval limits on channel hangup. --- diff --git a/src/mod/applications/mod_hiredis/mod_hiredis.c b/src/mod/applications/mod_hiredis/mod_hiredis.c index 1085f189c3..4c4597e9a8 100644 --- a/src/mod/applications/mod_hiredis/mod_hiredis.c +++ b/src/mod/applications/mod_hiredis/mod_hiredis.c @@ -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); }