summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTobi Oetiker <tobi@oetiker.ch>2008-06-08 23:37:10 +0200
committerTobi Oetiker <tobi@oetiker.ch>2008-06-08 23:37:10 +0200
commit400065442d62705a6cebcf6f5c5aa53a3bccf34f (patch)
treed1b4b6f36cff2c253964a6c607e8ab1eab2660e6
parent9a6c0d09fb7ac906607f5fd2f4ec18d126ee5b72 (diff)
downloadsmokeping-400065442d62705a6cebcf6f5c5aa53a3bccf34f.tar.gz
smokeping-400065442d62705a6cebcf6f5c5aa53a3bccf34f.tar.xz
fixed regression from r680 which broken old fping detection
-rw-r--r--CHANGES3
-rw-r--r--lib/Smokeping/probes/FPing.pm4
2 files changed, 5 insertions, 2 deletions
diff --git a/CHANGES b/CHANGES
index fce7f97..de1dca5 100644
--- a/CHANGES
+++ b/CHANGES
@@ -1,3 +1,6 @@
+* fixed FPing regression created in r680 it broke the proper handling of old
+ version of fping. Found by Celedonio Miranda Torresano -- tobi
+
* first cut at mtr integration ... added new menuextra config item
to build mtr links. -- tobi
diff --git a/lib/Smokeping/probes/FPing.pm b/lib/Smokeping/probes/FPing.pm
index 331fabf..133996c 100644
--- a/lib/Smokeping/probes/FPing.pm
+++ b/lib/Smokeping/probes/FPing.pm
@@ -66,9 +66,9 @@ sub new($$$)
if $return =~ m/only.+root/;
if ($return =~ m/bytes, ([0-9.]+)\sms\s+.*\n.*\n.*:\s+([0-9.]+)/ and $1 > 0){
- $self->{pingfactor} = 1000 * $1/$2;
+ $self->{pingfactor} = 1000 * $2/$1;
if ($1 != $2){
- warn "### fping seems to report in ", $1/$2, " milliseconds (old version?)";
+ warn "### fping seems to report in ", $2/$1, " milliseconds (old version?)";
}
} else {
$self->{pingfactor} = 1000; # Gives us a good-guess default