INN commit: branches/2.4 (2 files)

INN Commit Russ_Allbery at isc.org
Sun Aug 3 07:47:10 UTC 2008


    Date: Sunday, August 3, 2008 @ 00:47:10
  Author: iulius
Revision: 7945

Bug-fixes:
* Trailing comma after %innfeed_spooled with "Outgoing feeds (innfeed) by Articles";
* Column "Total" of "Outgoing feeds (innfeed) by Volume" tries to add two hashes
  which evaluates to a constant 0;
* Gracefully handle undefined hash elements in "NNRP readership statistics (by domain)".

Also added two error messages generated by perl-nocem.


Thanks again, Alexander Bartolich, for this patch.

Modified:
  branches/2.4/samples/innreport.conf.in
  branches/2.4/scripts/innreport_inn.pm

---------------------------+
 samples/innreport.conf.in |   16 +++++-----------
 scripts/innreport_inn.pm  |   29 ++++++++++++++++++++++-------
 2 files changed, 27 insertions(+), 18 deletions(-)

Modified: samples/innreport.conf.in
===================================================================
--- samples/innreport.conf.in	2008-08-03 07:30:03 UTC (rev 7944)
+++ samples/innreport.conf.in	2008-08-03 07:47:10 UTC (rev 7945)
@@ -1267,7 +1267,7 @@
 		data {
 		          name    "Spooled";
 			  color   "#AF00FF";
-			  value   "%innfeed_spooled,";
+			  value   "%innfeed_spooled";
                 };
 	};
 };
@@ -1347,12 +1347,6 @@
 			color	"#FFAF00";
 			value	"%innfeed_rejected_size";
 		};
-		data {
-			name	"Total";
-			color	"#00FF00";
-			value	"%innfeed_accepted_size +
-                                 %innfeed_rejected_size";
-		};
 	};
 };
 
@@ -2116,8 +2110,8 @@
                 name          "Rej";
                 format_name   "%4s";
                 format        "%4d";
-		value         "$nnrpd_post_rej{$key} +
-                               $nnrpd_post_error{$key}";
+		value         "($nnrpd_post_rej{$key}||0) +
+                               ($nnrpd_post_error{$key}||0)";
 		total         "total(%nnrpd_post_rej) +
 		               total(%nnrpd_post_error)";
         };
@@ -2179,8 +2173,8 @@
                 name          "Rej";
                 format_name   "%4s";
                 format        "%4d";
-                value         "$nnrpd_dom_post_rej{$key} +
-	                       $nnrpd_dom_post_error{$key}";
+                value         "($nnrpd_dom_post_rej{$key}||0) +
+	                       ($nnrpd_dom_post_error{$key}||0)";
                 total         "total(%nnrpd_dom_post_rej) +
                                total(%nnrpd_dom_post_error)";
         };

Modified: scripts/innreport_inn.pm
===================================================================
--- scripts/innreport_inn.pm	2008-08-03 07:30:03 UTC (rev 7944)
+++ scripts/innreport_inn.pm	2008-08-03 07:47:10 UTC (rev 7945)
@@ -440,8 +440,8 @@
     # The exact timers change from various versions of INN, so try to deal
     # with this in a general fashion.
     if ($left =~ m/^\S+\s+                         # ME
-	           time\ (\d+)\s+                  # time
-                   ((?:\S+\ \d+\(\d+\)\s*)+)       # timer values
+	           time\s(\d+)\s+                  # time
+                   ((?:\S+\s\d+\(\d+\)\s*)+)       # timer values
                    $/ox) {
       $innd_time_times += $1;
       my $timers = $2;
@@ -719,8 +719,8 @@
     # ME time X nnnn X(X) [...]
     return 1 if $left =~ m/backlogstats/;
     if ($left =~ m/^\S+\s+                         # ME
-                   time\ (\d+)\s+                  # time
-                   ((?:\S+\ \d+\(\d+\)\s*)+)       # timer values
+                   time\s(\d+)\s+                  # time
+                   ((?:\S+\s\d+\(\d+\)\s*)+)       # timer values
                    $/ox) {
       $innfeed_time_times += $1;
       my $timers = $2;
@@ -1459,8 +1459,8 @@
     # The exact timers change from various versions of INN, so try to deal
     # with this in a general fashion.
     if ($left =~ m/^\S+\s+                         # ME
-	           time\ (\d+)\s+                  # time
-                   ((?:\S+\ \d+\(\d+\)\s*)+)       # timer values
+	           time\s(\d+)\s+                  # time
+                   ((?:\S+\s\d+\(\d+\)\s*)+)       # timer values
                    $/ox) {
       $nnrpd_time_times += $1;
       my $timers = $2;
@@ -1683,13 +1683,28 @@
       $nocem_totalids{$nocem_lastid} += $2;
       return 1;
     }
-    if ($left =~ /bad signature from (.*)/o) {
+    if ($left =~ /Article <[^>]*>: (.*) \(ID [[:xdigit:]]*\) not in keyring/o) {
+       $nocem_badsigs{$1}++;
+       $nocem_goodsigs{$1} = 0 unless ($nocem_goodsigs{$1});
+       $nocem_totalbad++;
+       $nocem_lastid = $1;
+       return 1;
+     }
+    if ($left =~ /Article <[^>]*>: bad signature from (.*)/o) {
       $nocem_badsigs{$1}++;
       $nocem_goodsigs{$1} = 0 unless ($nocem_goodsigs{$1});
       $nocem_totalbad++;
       $nocem_lastid = $1;
       return 1;
     }
+    if ($left =~ /Article <[^>]*>: malformed signature/o) {
+      $nocem_badsigs{'N/A'}++;
+      $nocem_goodsigs{'N/A'} = 0 unless ($nocem_goodsigs{'N/A'});
+      $nocem_totalbad++;
+      $nocem_lastid = 'N/A';
+      return 1;
+    }
+
     return 1;
   }
 



More information about the inn-committers mailing list