summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNiko Tyni <ntyni@iki.fi>2005-09-26 21:18:43 +0200
committerNiko Tyni <ntyni@iki.fi>2005-09-26 21:18:43 +0200
commit1d1ad79d657c4706933332cc17af5f15df0353a0 (patch)
tree0ce8cd09b75d9cfe11a69dace4e4f09f55952582
parentbf49085b6ef259192f6b012ad1d83e5c4cb7edd0 (diff)
downloadsmokeping-1d1ad79d657c4706933332cc17af5f15df0353a0.tar.gz
smokeping-1d1ad79d657c4706933332cc17af5f15df0353a0.tar.xz
* (trunk,2.0)/
lib/Smokeping/probes/FPing.pm, CHANGES: + fix fping output parsing regexp so it doesn't report 100% loss when the first ping is lost
-rw-r--r--CHANGES2
-rw-r--r--lib/Smokeping/probes/FPing.pm3
2 files changed, 4 insertions, 1 deletions
diff --git a/CHANGES b/CHANGES
index 07d74ce..12a5d5a 100644
--- a/CHANGES
+++ b/CHANGES
@@ -1,3 +1,5 @@
+* fixed FPing probe so it doesn't report 100% loss when the first ping is lost
+ -- niko, reported by Matthew Swainston <njunk *exemail.com.au>
* don't need to have all the external modules installed to build the
documentation -- niko
diff --git a/lib/Smokeping/probes/FPing.pm b/lib/Smokeping/probes/FPing.pm
index 1b44c51..e7d2a4c 100644
--- a/lib/Smokeping/probes/FPing.pm
+++ b/lib/Smokeping/probes/FPing.pm
@@ -117,7 +117,8 @@ sub ping ($){
$self->{rtts}={};
while (<$errh>){
chomp;
- next unless /^\S+\s+:\s+[\d\.]/; #filter out error messages from fping
+ $self->do_debug("Got fping output: '$_'");
+ next unless /^\S+\s+:\s+[-\d\.]/; #filter out error messages from fping
my @times = split /\s+/;
my $ip = shift @times;
next unless ':' eq shift @times; #drop the colon