From aca01304a6c2638c9667711967b9ee1aa9bd09d9 Mon Sep 17 00:00:00 2001 From: Niko Tyni Date: Tue, 18 Oct 2005 05:22:40 +0000 Subject: * (trunk,2.0)/ lib/Smokeping.pm, CHANGES: + get rid of 'Use of uninitialized value' messages when using the Avgratio matcher --- CHANGES | 3 +++ lib/Smokeping.pm | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/CHANGES b/CHANGES index 3f2550f..edf6d07 100644 --- a/CHANGES +++ b/CHANGES @@ -1,3 +1,6 @@ +* get rid of 'Use of uninitialized value' messages when using the Avgratio matcher + and 'edgetrigger' -- niko, reported by John L Hoo + 2005/10/18 -- released version 20051018_trunk 2005/10/17 -- released version 20051017_trunk diff --git a/lib/Smokeping.pm b/lib/Smokeping.pm index 3016f07..8462307 100644 --- a/lib/Smokeping.pm +++ b/lib/Smokeping.pm @@ -1107,7 +1107,7 @@ sub update_rrds($$$$$) { next; }; my $prevmatch = $tree->{prevmatch}{$_} || 0; - my $match = &{$cfg->{Alerts}{$_}{sub}}($x); + my $match = &{$cfg->{Alerts}{$_}{sub}}($x) || 0; # Avgratio returns undef my $edgetrigger = $cfg->{Alerts}{$_}{edgetrigger} eq 'yes'; my $what; if ($edgetrigger and $prevmatch != $match) { -- cgit v1.2.3-24-g4f1b