INN commit: trunk/scripts (innreport_inn.pm)

INN Commit rra at isc.org
Tue Mar 16 19:47:16 UTC 2010


    Date: Tuesday, March 16, 2010 @ 12:47:16
  Author: iulius
Revision: 9007

Prevent negative values from being reported in nnrpd for
the number of groups read by a client.

Modified:
  trunk/scripts/innreport_inn.pm

------------------+
 innreport_inn.pm |   11 +++--------
 1 file changed, 3 insertions(+), 8 deletions(-)

Modified: innreport_inn.pm
===================================================================
--- innreport_inn.pm	2010-03-16 19:45:37 UTC (rev 9006)
+++ innreport_inn.pm	2010-03-16 19:47:16 UTC (rev 9007)
@@ -2073,20 +2073,15 @@
 	  my $dom = &host2dom($serv);
 	  $nnrpd_dom_connect{$dom} -= $nnrpd_connect{$serv}
 	    if defined $nnrpd_dom_connect{$dom};
-	  $nnrpd_dom_groups{$dom}  -= $nnrpd_groups{$serv}
-	    if defined $nnrpd_dom_groups{$dom};
 	  $nnrpd_dom_times{$dom}   -= $nnrpd_times{$serv}
 	    if defined $nnrpd_dom_times{$dom};
 
-          # The message "bad_auth" can occur more then once per session.
+          # The message "bad_auth" can occur more than once per session.
           # Subtracting nnrpd_no_permission from nnrpd_connect is
           # broken and can yield negative values for nnrpd_connect.
 	  $nnrpd_connect{$serv} -= $nnrpd_no_permission{$serv};
 
-	  $nnrpd_groups{$serv} -= $nnrpd_no_permission{$serv}
-	    if defined $nnrpd_groups{$serv};
-
-          # Perl considers negative values to be true. Previously the
+          # Perl considers negative values to be true.  Previously the
           # hash entry was deleted only if the value was exactly 0.
           delete $nnrpd_connect{$serv} unless $nnrpd_connect{$serv} > 0;
 
@@ -2094,7 +2089,7 @@
 	  delete $nnrpd_times{$serv}   unless $nnrpd_times{$serv};
 	  delete $nnrpd_usr_times{$serv}   unless $nnrpd_usr_times{$serv};
 	  delete $nnrpd_sys_times{$serv}   unless $nnrpd_sys_times{$serv};
-	  delete $nnrpd_dom_connect{$dom} unless $nnrpd_dom_connect{$dom};
+	  delete $nnrpd_dom_connect{$dom} unless $nnrpd_dom_connect{$dom} > 0;
 	  delete $nnrpd_dom_groups{$dom}  unless $nnrpd_dom_groups{$dom};
 	  delete $nnrpd_dom_times{$dom}   unless $nnrpd_dom_times{$dom};
 	  $c--;




More information about the inn-committers mailing list