From 9d6351476d4e5ad17828ee88e72880ace131f8d8 Mon Sep 17 00:00:00 2001 From: Nigel Kukard <nkukard@lbsd.net> Date: Mon, 31 Jan 2011 06:20:58 +0000 Subject: [PATCH] Fixed wrong sign when checking for if we still in the cache period --- smradius/modules/accounting/mod_accounting_sql.pm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/smradius/modules/accounting/mod_accounting_sql.pm b/smradius/modules/accounting/mod_accounting_sql.pm index 16b76bc8..232dc93c 100644 --- a/smradius/modules/accounting/mod_accounting_sql.pm +++ b/smradius/modules/accounting/mod_accounting_sql.pm @@ -340,7 +340,7 @@ sub getUsage # If we using caching, check how old the result is if (defined($config->{'accounting_usage_cache_time'})) { my ($res,$val) = cacheGetComplexKeyPair('mod_accounting_sql(getUsage)',$user->{'Username'}."/".$template->{'query'}->{'PeriodKey'}); - if (defined($val) && $val->{'CachedUntil'} < $user->{'_Internal'}->{'Timestamp-Unix'}) { + if (defined($val) && $val->{'CachedUntil'} > $user->{'_Internal'}->{'Timestamp-Unix'}) { return $val; } } -- GitLab