Commit 904e9cf1 authored by Nigel Kukard's avatar Nigel Kukard
Browse files

* Fixed bug in quotas where non-existant counters were being used

parent 5479299f
...@@ -185,7 +185,6 @@ sub check { ...@@ -185,7 +185,6 @@ sub check {
# Check for violation # Check for violation
if ($qtrack->{'Counter'} > $limit->{'CounterLimit'}) { if ($qtrack->{'Counter'} > $limit->{'CounterLimit'}) {
$hasExceeded = "Policy rejection; Message count quota exceeded"; $hasExceeded = "Policy rejection; Message count quota exceeded";
$exceededLimit = $limit;
} }
# Bump up limit # Bump up limit
$newCounters{$qtrack->{'QuotasLimitsID'}}++; $newCounters{$qtrack->{'QuotasLimitsID'}}++;
...@@ -195,7 +194,6 @@ sub check { ...@@ -195,7 +194,6 @@ sub check {
# Check for violation # Check for violation
if ($qtrack->{'Counter'} > $limit->{'CounterLimit'}) { if ($qtrack->{'Counter'} > $limit->{'CounterLimit'}) {
$hasExceeded = "Policy rejection; Cumulative message size quota exceeded"; $hasExceeded = "Policy rejection; Cumulative message size quota exceeded";
$exceededLimit = $limit;
} }
} }
...@@ -217,11 +215,11 @@ sub check { ...@@ -217,11 +215,11 @@ sub check {
# Setup some stuff we need for logging # Setup some stuff we need for logging
$qtrack->{'DBKey'} = $key; $qtrack->{'DBKey'} = $key;
$qtrack->{'CounterLimit'} = $exceededLimit->{'CounterLimit'}; $qtrack->{'CounterLimit'} = $limit->{'CounterLimit'};
$qtrack->{'LimitType'} = $exceededLimit->{'Type'}; $qtrack->{'LimitType'} = $limit->{'Type'};
$qtrack->{'PolicyID'} = $policyID; $qtrack->{'PolicyID'} = $policyID;
$qtrack->{'QuotaID'} = $quota->{'ID'}; $qtrack->{'QuotaID'} = $quota->{'ID'};
$qtrack->{'LimitID'} = $exceededLimit->{'ID'}; $qtrack->{'LimitID'} = $limit->{'ID'};
$qtrack->{'Verdict'} = $quota->{'Verdict'}; $qtrack->{'Verdict'} = $quota->{'Verdict'};
$qtrack->{'VerdictData'} = $quota->{'Data'}; $qtrack->{'VerdictData'} = $quota->{'Data'};
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment