summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTobias Oetiker <tobi@oetiker.ch>2011-10-20 09:24:17 +0200
committerTobias Oetiker <tobi@oetiker.ch>2011-10-20 09:24:17 +0200
commitccd03bfead2c62f3541a6ee944270789f18b8f38 (patch)
treef34f77413f50b5d6385acb86fc2c6fb9f1b45c15
parent4b4dc3a97a0b77a12ac036b4a1985f083ae11cdb (diff)
downloadsmokeping-ccd03bfead2c62f3541a6ee944270789f18b8f38.tar.gz
smokeping-ccd03bfead2c62f3541a6ee944270789f18b8f38.tar.xz
it seems some version of perl bulk at gettimeofday without ()
-rw-r--r--CHANGES4
-rw-r--r--lib/Smokeping/probes/AnotherDNS.pm4
-rw-r--r--lib/Smokeping/probes/AnotherSSH.pm10
3 files changed, 11 insertions, 7 deletions
diff --git a/CHANGES b/CHANGES
index 3172757..4d454a0 100644
--- a/CHANGES
+++ b/CHANGES
@@ -1,3 +1,7 @@
+2011/10/20 -- released version 2.6.3
+
+* make sure probes call gettimeofday with () as noted by Phillip Corchary
+
2011/10/11 -- released version 2.6.2
* migrated to github.com/oetiker/SmokePing
diff --git a/lib/Smokeping/probes/AnotherDNS.pm b/lib/Smokeping/probes/AnotherDNS.pm
index 185426d..48ff924 100644
--- a/lib/Smokeping/probes/AnotherDNS.pm
+++ b/lib/Smokeping/probes/AnotherDNS.pm
@@ -88,10 +88,10 @@ sub pingone ($) {
my $timeleft = $mininterval - $elapsed;
sleep $timeleft if $timeleft > 0;
}
- my $t0 = [gettimeofday];
+ my $t0 = [gettimeofday()];
$sock->send($packet);
my ($ready) = $sel->can_read($timeout);
- my $t1 = [gettimeofday];
+ my $t1 = [gettimeofday()];
$elapsed = tv_interval( $t0, $t1 );
if ( defined $ready ) {
my $buf = '';
diff --git a/lib/Smokeping/probes/AnotherSSH.pm b/lib/Smokeping/probes/AnotherSSH.pm
index c708de9..e762764 100644
--- a/lib/Smokeping/probes/AnotherSSH.pm
+++ b/lib/Smokeping/probes/AnotherSSH.pm
@@ -75,7 +75,7 @@ sub pingone ($) {
my $t0;
for ( my $run = 0 ; $run < $self->pings($target) ; $run++ ) {
if (defined $t0) {
- my $elapsed = tv_interval($t0, [gettimeofday]);
+ my $elapsed = tv_interval($t0, [gettimeofday()]);
my $timeleft = $mininterval - $elapsed;
sleep $timeleft if $timeleft > 0;
}
@@ -106,10 +106,10 @@ sub pingone ($) {
my $sel = IO::Select->new( \*Socket_Handle );
# connect () and measure the Time.
- $t0 = [gettimeofday];
+ $t0 = [gettimeofday()];
connect( Socket_Handle, $sin );
($ready) = $sel->can_read($timeout);
- $t1 = [gettimeofday];
+ $t1 = [gettimeofday()];
if(not defined $ready) {
$self->do_debug("Timeout!");
@@ -131,10 +131,10 @@ sub pingone ($) {
$self->do_debug("Huh? Can't write.");
close(Socket_Handle); next;
}
- $t2 = [gettimeofday];
+ $t2 = [gettimeofday()];
syswrite( Socket_Handle, $greeting . "\n" );
($ready) = $sel->can_read($timeout);
- $t3 = [gettimeofday];
+ $t3 = [gettimeofday()];
if(not defined $ready) {
$self->do_debug("Timeout!");
close(Socket_Handle); next;