INN commit: trunk/scripts (innreport_inn.pm)

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


    Date: Tuesday, March 16, 2010 @ 12:44:04
  Author: iulius
Revision: 9005

Properly count the number of groups opened during a session,
and which contained at least an article.

Previously, the count was not taken into account when groups
were opened with no new articles in any of them.  And it
was taken into account for groups with no articles, provided
that at least one contained an article.

The result is now more coherent.

Modified:
  trunk/scripts/innreport_inn.pm

------------------+
 innreport_inn.pm |    8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)

Modified: innreport_inn.pm
===================================================================
--- innreport_inn.pm	2010-03-16 19:39:42 UTC (rev 9004)
+++ innreport_inn.pm	2010-03-16 19:44:04 UTC (rev 9005)
@@ -1499,8 +1499,14 @@
     # group
     if ($left =~ /(\S+) group (\S+) (\d+)$/o) {
       my ($cust, $group, $num) = ($1, $2, $3);
+      $cust = lc $cust unless $CASE_SENSITIVE;
+      my $dom = &host2dom($cust);
+
       if ($num) {
 	$nnrpd_group{$group} += $num;
+        $nnrpd_groups{$cust}++;
+        $nnrpd_dom_groups{$dom}++;
+
 	my ($hierarchy) = $group =~ /^([^\.]+).*$/o;
 	$nnrpd_hierarchy{$hierarchy} += $num;
       }
@@ -1589,8 +1595,6 @@
         $nnrpd_connect{$cust}++;
         $nnrpd_dom_connect{$dom}++;
       }
-      $nnrpd_groups{$cust} += $groups;
-      $nnrpd_dom_groups{$dom} += $groups;
       $nnrpd_articles{$cust} += $articles;
       $nnrpd_dom_articles{$dom} += $articles;
       return 1;




More information about the inn-committers mailing list