1 Bug-fixes for innreport:
2 - Test for the existence of 'img_dir' instead of 'html_dir' in innreport;
3 - Trailing comma after %innfeed_spooled with "Outgoing feeds (innfeed)
5 - Column "Total" of "Outgoing feeds (innfeed) by Volume" tries to add
6 two hashes which evaluates to a constant 0;
7 - Gracefully handle undefined hash elements in "NNRP readership statistics
9 - Also added two error messages generated by perl-nocem.
11 http://inn.eyrie.org/viewcvs/branches/2.4/scripts/innreport.in?r1=8142&r2=8141&pathrev=8142&view=patch
12 http://inn.eyrie.org/viewcvs/branches/2.4/samples/innreport.conf.in?r1=7945&r2=7944&pathrev=7945&view=patch
13 http://inn.eyrie.org/viewcvs/branches/2.4/scripts/innreport_inn.pm?r1=7945&r2=7944&pathrev=7945&view=patch
15 --- 2.4/scripts/innreport.in 2008/10/05 23:47:25 8141
16 +++ 2.4/scripts/innreport.in 2008/10/07 17:08:32 8142
18 $IMG_pth = $ref{'webpath'} if defined $ref{'webpath'};
20 $IMG_dir = $HTML_dir . "/" . $IMG_pth
21 - if (defined $output{'default'}{'html_dir'} ||
22 + if (defined $output{'default'}{'img_dir'} ||
23 defined $ref{'w'} || defined $ref{'webpath'})
25 (defined $output{'default'}{'html_dir'} ||
26 --- 2.4/samples/innreport.conf.in 2008/08/03 07:30:03 7944
27 +++ 2.4/samples/innreport.conf.in 2008/08/03 07:47:10 7945
32 - value "%innfeed_spooled,";
33 + value "%innfeed_spooled";
37 @@ -1347,12 +1347,6 @@
39 value "%innfeed_rejected_size";
44 - value "%innfeed_accepted_size +
45 - %innfeed_rejected_size";
54 - value "$nnrpd_post_rej{$key} +
55 - $nnrpd_post_error{$key}";
56 + value "($nnrpd_post_rej{$key}||0) +
57 + ($nnrpd_post_error{$key}||0)";
58 total "total(%nnrpd_post_rej) +
59 total(%nnrpd_post_error)";
65 - value "$nnrpd_dom_post_rej{$key} +
66 - $nnrpd_dom_post_error{$key}";
67 + value "($nnrpd_dom_post_rej{$key}||0) +
68 + ($nnrpd_dom_post_error{$key}||0)";
69 total "total(%nnrpd_dom_post_rej) +
70 total(%nnrpd_dom_post_error)";
72 --- 2.4/scripts/innreport_inn.pm 2008/08/03 07:30:03 7944
73 +++ 2.4/scripts/innreport_inn.pm 2008/08/03 07:47:10 7945
75 # The exact timers change from various versions of INN, so try to deal
76 # with this in a general fashion.
77 if ($left =~ m/^\S+\s+ # ME
78 - time\ (\d+)\s+ # time
79 - ((?:\S+\ \d+\(\d+\)\s*)+) # timer values
80 + time\s(\d+)\s+ # time
81 + ((?:\S+\s\d+\(\d+\)\s*)+) # timer values
83 $innd_time_times += $1;
86 # ME time X nnnn X(X) [...]
87 return 1 if $left =~ m/backlogstats/;
88 if ($left =~ m/^\S+\s+ # ME
89 - time\ (\d+)\s+ # time
90 - ((?:\S+\ \d+\(\d+\)\s*)+) # timer values
91 + time\s(\d+)\s+ # time
92 + ((?:\S+\s\d+\(\d+\)\s*)+) # timer values
94 $innfeed_time_times += $1;
97 # The exact timers change from various versions of INN, so try to deal
98 # with this in a general fashion.
99 if ($left =~ m/^\S+\s+ # ME
100 - time\ (\d+)\s+ # time
101 - ((?:\S+\ \d+\(\d+\)\s*)+) # timer values
102 + time\s(\d+)\s+ # time
103 + ((?:\S+\s\d+\(\d+\)\s*)+) # timer values
105 $nnrpd_time_times += $1;
107 @@ -1683,13 +1683,28 @@
108 $nocem_totalids{$nocem_lastid} += $2;
111 - if ($left =~ /bad signature from (.*)/o) {
112 + if ($left =~ /Article <[^>]*>: (.*) \(ID [[:xdigit:]]*\) not in keyring/o) {
113 + $nocem_badsigs{$1}++;
114 + $nocem_goodsigs{$1} = 0 unless ($nocem_goodsigs{$1});
116 + $nocem_lastid = $1;
119 + if ($left =~ /Article <[^>]*>: bad signature from (.*)/o) {
120 $nocem_badsigs{$1}++;
121 $nocem_goodsigs{$1} = 0 unless ($nocem_goodsigs{$1});
126 + if ($left =~ /Article <[^>]*>: malformed signature/o) {
127 + $nocem_badsigs{'N/A'}++;
128 + $nocem_goodsigs{'N/A'} = 0 unless ($nocem_goodsigs{'N/A'});
130 + $nocem_lastid = 'N/A';