From 4ddd6688d16443d84aabd6ce5d0d540f71b9b4b5 Mon Sep 17 00:00:00 2001 From: Tobi Oetiker Date: Mon, 25 Feb 2008 09:53:02 +0000 Subject: nomasterpoll does not get a default value automatically ... so lets check for nothing as well --- lib/Smokeping.pm | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/lib/Smokeping.pm b/lib/Smokeping.pm index 11b896c..28eca8a 100644 --- a/lib/Smokeping.pm +++ b/lib/Smokeping.pm @@ -401,7 +401,7 @@ sub add_targets ($$$$){ if (ref $tree->{$prop} eq 'HASH'){ add_targets $cfg, $probes, $tree->{$prop}, "$name/$prop"; } - if ($prop eq 'host' and $tree->{nomasterpoll} eq 'no' and check_filter($cfg,$name) and $tree->{$prop} !~ m|^/| ) { + if ($prop eq 'host' and ( not $tree->{nomasterpoll} or $tree->{nomasterpoll} eq 'no') and check_filter($cfg,$name) and $tree->{$prop} !~ m|^/| ) { if($tree->{host} =~ /^DYNAMIC/) { $probeobj->add($tree,$name); } else { @@ -750,7 +750,7 @@ sub get_overview ($$$$){ next unless $phys_tree->{host}; next if $phys_tree->{hide} and $phys_tree->{hide} eq 'yes'; - if ($phys_tree->{nomasterpoll} eq 'no'){ + if (not $phys_tree->{nomasterpoll} or $phys_tree->{nomasterpoll} eq 'no'){ @slaves = (""); }; @@ -973,7 +973,7 @@ sub get_detail ($$$$;$){ $tree = $phys_tree; my @slaves; - if ($tree->{nomasterpoll} eq 'no'){ + if (not $tree->{nomasterpoll} or $tree->{nomasterpoll} eq 'no'){ @slaves = (""); }; @@ -1852,7 +1852,7 @@ sub update_rrds($$$$$$) { my %slave_test; my $slaveupdates; my @updates; - if ($tree->{nomasterpoll} eq 'no'){ + if (not $tree->{nomasterpoll} or $tree->{nomasterpoll} eq 'no'){ @updates = ([ "", time, $probeobj->rrdupdate_string($tree) ]); } if ($tree->{slaves}){ -- cgit v1.2.3-24-g4f1b