I got some further. It seems that (maybe) just the logline is wrong. I
sent two mail form my account, after the first mail, the log said
quota=5/500 (why not 1/500). The DB Entry is correct and shows 1:
Please try the attached patch for v2.0.11RC1 and let us know if it fixes
your the problem you are having.
Robert
Index: cbp/modules/Quotas.pm
===================================================================
--- cbp/modules/Quotas.pm (revision 517)
+++ cbp/modules/Quotas.pm (working copy)
@@ -247,7 +247,7 @@
foreach my $qtrack (@trackingList) {
# Percent used
- my $pused = sprintf('%.1f', ( ($newCounters{$qtrack->{'QuotasLimitsID'}} + $qtrack->{'QuotasLimitsID'}) / $qtrack->{'CounterLimit'} ) * 100);
+ my $pused = sprintf('%.1f', ( ($newCounters{$qtrack->{'QuotasLimitsID'}} + $qtrack->{'Counter'}) / $qtrack->{'CounterLimit'} ) * 100);
# Update database
my $sth = DBDo("
@@ -296,7 +296,7 @@
$qtrack->{'LimitID'},
$qtrack->{'DBKey'},
$qtrack->{'LimitType'},
- sprintf('%.0f',$newCounters{$qtrack->{'QuotasLimitsID'}} + $qtrack->{'QuotasLimitsID'}),
+ sprintf('%.0f',$newCounters{$qtrack->{'QuotasLimitsID'}} + $qtrack->{'Counter'}),
$qtrack->{'CounterLimit'},
$pused);
@@ -315,7 +315,7 @@
$qtrack->{'LimitID'},
$qtrack->{'DBKey'},
$qtrack->{'LimitType'},
- sprintf('%.0f',$newCounters{$qtrack->{'QuotasLimitsID'}} + $qtrack->{'QuotasLimitsID'}),
+ sprintf('%.0f',$newCounters{$qtrack->{'QuotasLimitsID'}} + $qtrack->{'Counter'}),
$qtrack->{'CounterLimit'},
$pused);
_______________________________________________
Users mailing list
[email protected]
http://lists.policyd.org/mailman/listinfo/users