Compare commits

...

2 Commits

Author SHA1 Message Date
Tom Eastep
e8b90f89a3 Clean up column/value pair editing.
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2017-03-22 09:47:48 -07:00
Tom Eastep
870f6130ee Set $parmsmodified on ?reset
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2017-03-18 12:39:33 -07:00

View File

@@ -2437,12 +2437,12 @@ sub split_line2( $$;$$$ ) {
}
} else {
fatal_error "Unknown column ($1)" unless exists $columnsref->{$column};
$column = $columnsref->{$column};
fatal_error "Non-ASCII gunk in file" if $columns =~ /[^\s[:print:]]/;
$value = $1 if $value =~ /^"([^"]+)"$/;
$value =~ s/\\"/"/g;
fatal_error "Non-ASCII gunk in the value of the $column column" if $columns =~ /[^\s[:print:]]/;
$line[$column] = $value;
fatal_error "Non-ASCII gunk in the value of the $column column" if $value =~ /[^\s[:print:]]/;
my $colnum = $columnsref->{$column};
warning_message qq(Replacing "$line[$colnum]" with "$value" in the ) . uc( $column ) . ' column' if $line[$colnum] ne '-';
$line[$colnum] = $value;
}
}
}
@@ -2962,10 +2962,11 @@ sub process_compiler_directive( $$$$ ) {
} else {
delete $actparams{$var}
}
$parmsmodified = PARMSMODIFIED;
} else {
directive_warning( 'Yes', "Shorewall variable $2 does not exist", $filename, $linenumber );
}
} else {
if ( exists $variables{$2} ) {
delete $variables{$2};