From: <buc...@us...> - 2015-06-02 14:59:23
|
Revision: 249 http://sourceforge.net/p/devmon/code/249 Author: buchanmilne Date: 2015-06-02 14:59:22 +0000 (Tue, 02 Jun 2015) Log Message: ----------- Merge patch from Wim Nelis (ticket #18) Modified Paths: -------------- trunk/modules/dm_tests.pm Modified: trunk/modules/dm_tests.pm =================================================================== --- trunk/modules/dm_tests.pm 2015-06-02 14:46:00 UTC (rev 248) +++ trunk/modules/dm_tests.pm 2015-06-02 14:59:22 UTC (rev 249) @@ -1990,12 +1990,12 @@ my $a_val = $dev->{'except'}{$test}{$pri}{'alarm'} || $dev->{'except'}{'all'}{$pri}{'alarm'} || $tmpl->{'oids'}{$pri}{'except'}{'alarm'}; - $alarm = ($pri_val =~ /^($a_val)$/) ? 1 : 0 if defined $a_val; + $alarm = ($pri_val =~ /^(?:$a_val)$/) ? 1 : 0 if defined $a_val; my $na_val = $dev->{'except'}{$test}{$pri}{'noalarm'} || $dev->{'except'}{'all'}{$pri}{'noalarm'} || $tmpl->{'oids'}{$pri}{'except'}{'noalarm'}; - $alarm = 0 if defined $na_val and $pri_val =~ /^($na_val)$/; + $alarm = 0 if defined $na_val and $pri_val =~ /^(?:$na_val)$/; # Now go through all the oids in our table row and replace them for my $root ($row_data =~ /\{(.+?)\}/g) { @@ -2023,8 +2023,8 @@ my $only = $dev->{'except'}{$test}{$oid}{'only'} || $dev->{'except'}{'all'}{$oid}{'only'} || $tmpl->{'oids'}{$oid}{'except'}{'only'}; - next T_LEAF if defined $ignore and $val =~ /^($ignore)$/; - next T_LEAF if defined $only and $val !~ /^($only)$/; + next T_LEAF if defined $ignore and $val =~ /^(?:$ignore)$/; + next T_LEAF if defined $only and $val !~ /^(?:$only)$/; # If we arent alarming on a value, its green by default @@ -2347,28 +2347,28 @@ if(defined $dev->{'except'}{$test}{$oid}{'noalarm'}) { my $match = $dev->{'except'}{$test}{$oid}{'noalarm'}; - return 1 if $val =~ /^($match)$/; + return 1 if $val =~ /^(?:$match)$/; } elsif(defined $dev->{'except'}{'all'}{$oid}{'noalarm'}) { my $match = $dev->{'except'}{'all'}{$oid}{'noalarm'}; - return 1 if $val =~ /^($match)$/; + return 1 if $val =~ /^(?:$match)$/; } elsif(defined $tmpl->{'oids'}{$oid}{'except'}{'noalarm'}) { my $match = $tmpl->{'oids'}{$oid}{'except'}{'noalarm'}; - return 1 if $val =~ /^($match)$/; + return 1 if $val =~ /^(?:$match)$/; } if(defined $dev->{'except'}{$test}{$oid}{'alarm'}) { my $match = $dev->{'except'}{$test}{$oid}{'alarm'}; - return 1 if $val !~ /^($match)$/; + return 1 if $val !~ /^(?:$match)$/; } elsif(defined $dev->{'except'}{'all'}{$oid}{'alarm'}) { my $match = $dev->{'except'}{'all'}{$oid}{'alarm'}; - return 1 if $val !~ /^($match)$/; + return 1 if $val !~ /^(?:$match)$/; } elsif(defined $tmpl->{'oids'}{$oid}{'except'}{'alarm'}) { my $match = $tmpl->{'oids'}{$oid}{'except'}{'alarm'}; - return 1 if $val !~ /^($match)$/; + return 1 if $val !~ /^(?:$match)$/; } } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |