diff options
author | Tobi Oetiker <tobi@oetiker.ch> | 2008-03-19 22:40:22 +0100 |
---|---|---|
committer | Tobi Oetiker <tobi@oetiker.ch> | 2008-03-19 22:40:22 +0100 |
commit | 4a2ee52a92ce7a2f4f62ff039bddeaaa7080309c (patch) | |
tree | 658c95d81a9aeed6ae9fd5afe777a8b433e82f3f /lib/Smokeping/probes/base.pm | |
parent | b6edbe8a83658ca1b35e502e6353e9b3d3762073 (diff) | |
download | smokeping-4a2ee52a92ce7a2f4f62ff039bddeaaa7080309c.tar.gz smokeping-4a2ee52a92ce7a2f4f62ff039bddeaaa7080309c.tar.xz |
added nikos fixes for nomasterpoll
Diffstat (limited to 'lib/Smokeping/probes/base.pm')
-rw-r--r-- | lib/Smokeping/probes/base.pm | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/Smokeping/probes/base.pm b/lib/Smokeping/probes/base.pm index 15cd03e..cdcad66 100644 --- a/lib/Smokeping/probes/base.pm +++ b/lib/Smokeping/probes/base.pm @@ -74,6 +74,8 @@ sub add($$) my $self = shift; my $tree = shift; + $self->{target_count}++; # increment this anyway + return if defined $tree->{nomasterpoll} and $tree->{nomasterpoll} eq "yes"; $self->{targets}{$tree} = shift; } @@ -281,7 +283,7 @@ sub _pings { sub target_count { my $self = shift; - return scalar keys %{$self->{targets}}; + return $self->{target_count}; } sub probevars { |