INN commit: branches/2.5/scripts (inncheck.in)
INN Commit
rra at isc.org
Fri Sep 24 17:36:46 UTC 2010
Date: Friday, September 24, 2010 @ 10:36:46
Author: iulius
Revision: 9112
inncheck was not substituting variables in the newsfeeds configuration file.
It therefore wrongly reported errors.
For instance:
$limitHI=131072
example/example.com:*:Ajp,Tm,<$limitHI:innfeed!
Now fixed. This example is properly parsed by inncheck.
Thanks to Michael Grimm for the bug report.
Modified:
branches/2.5/scripts/inncheck.in
-------------+
inncheck.in | 11 +++++++++--
1 file changed, 9 insertions(+), 2 deletions(-)
Modified: inncheck.in
===================================================================
--- inncheck.in 2010-09-24 17:35:48 UTC (rev 9111)
+++ inncheck.in 2010-09-24 17:36:46 UTC (rev 9112)
@@ -389,6 +389,7 @@
local ($next, $start, $me_empty, @muxes, %sites);
local ($site, $pats, $dists, $flags, $param, $type, $k, $v, $defsub);
local ($bang, $nobang, $prog, $dir);
+ local (%variables, $key);
input: while ( <IN> ) {
$line++;
@@ -410,10 +411,16 @@
print "$file:$line: ends with whitespace\n"
if /\s+$/;
- # Catch a variable setting.
- if ( /^\$([A-Za-z0-9]+)=/ ) {
+ ## Substitute variables.
+ for my $key (keys %variables) {
+ s/\$$key/$variables{$key}/;
+ }
+
+ ## Catch a variable setting.
+ if ( /^\$([A-Za-z0-9]+)=(.*)$/ ) {
print "$file:$line: variable name too long\n"
if length ($1) > 31;
+ $variables{$1} = $2;
next input;
}
More information about the inn-committers
mailing list