diff options
author | Tobi Oetiker <tobi@oetiker.ch> | 2006-09-20 21:16:30 +0200 |
---|---|---|
committer | Tobi Oetiker <tobi@oetiker.ch> | 2006-09-20 21:16:30 +0200 |
commit | cef00a141fcccd95c3eaaac5e05d1b2aead6b49f (patch) | |
tree | e5e9c041eb0c0cfd4656af52145e82af1621eb6a /lib | |
parent | d9d02e26fe34b577f5b2dab1d654a3da49190449 (diff) | |
download | smokeping-cef00a141fcccd95c3eaaac5e05d1b2aead6b49f.tar.gz smokeping-cef00a141fcccd95c3eaaac5e05d1b2aead6b49f.tar.xz |
fixed FTPtransfer probe to use srcfile as default for destfile.
Diffstat (limited to 'lib')
-rw-r--r-- | lib/Smokeping.pm | 2 | ||||
-rw-r--r-- | lib/Smokeping/probes/FTPtransfer.pm | 6 |
2 files changed, 4 insertions, 4 deletions
diff --git a/lib/Smokeping.pm b/lib/Smokeping.pm index 5535df1..b64c50a 100644 --- a/lib/Smokeping.pm +++ b/lib/Smokeping.pm @@ -28,7 +28,7 @@ use Smokeping::RRDtools; # globale persistent variables for speedy use vars qw($cfg $probes $VERSION $havegetaddrinfo $cgimode); -$VERSION="2.000904"; +$VERSION="2.000906"; # we want opts everywhere my %opt; diff --git a/lib/Smokeping/probes/FTPtransfer.pm b/lib/Smokeping/probes/FTPtransfer.pm index d3dd41d..6be72fc 100644 --- a/lib/Smokeping/probes/FTPtransfer.pm +++ b/lib/Smokeping/probes/FTPtransfer.pm @@ -75,7 +75,7 @@ DOC sub ProbeDesc ($) { my $self = shift; my $srcfile = $self->{properties}{srcfile}; - my $destfile = $self->{properties}{destfile}; + my $destfile = $self->{properties}{destfile} || $self->{properties}{srcfile}; my $mode = $self->{properties}{mode}; my $size = $mode eq 'get' ? -s $destfile : -s $srcfile; return sprintf("FTP File transfers (%.0f KB)",$size/1024); @@ -95,7 +95,7 @@ sub pingone { my $vars = $target->{vars}; my $mininterval = $self->{properties}{min_interval}; my $srcfile = $self->{properties}{srcfile}; - my $destfile = $self->{properties}{destfile}; + my $destfile = $self->{properties}{destfile} || $self->{properties}{srcfile}; my $mode = $self->{properties}{mode}; my $username = $vars->{username}; @@ -174,7 +174,7 @@ DOC destfile => { _doc => <<DOC, Normally the destination filename is the same as the source filename. If you keep files in different directories -this may not work, and you have to specify a destfilename as well. +this may not work, and you have to specify destfile as well. DOC _example => 'destinationfile', }, |