From: Jarkko Hietaniemi Date: Fri, 12 Apr 2002 02:10:33 +0000 (+0000) Subject: Update to Net::Ping 2.16. X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=a5a165b1a650c2a559ea5115716f29e938b821fd;p=p5sagit%2Fp5-mst-13.2.git Update to Net::Ping 2.16. p4raw-id: //depot/perl@15873 --- diff --git a/lib/Net/Ping.pm b/lib/Net/Ping.pm index 874f1c5..6c61a47 100644 --- a/lib/Net/Ping.pm +++ b/lib/Net/Ping.pm @@ -1,6 +1,6 @@ package Net::Ping; -# $Id: Ping.pm,v 1.27 2002/04/02 02:01:21 rob Exp $ +# $Id: Ping.pm,v 1.31 2002/04/11 16:45:06 rob Exp $ require 5.002; require Exporter; @@ -16,12 +16,12 @@ use Errno qw(ECONNREFUSED); @ISA = qw(Exporter); @EXPORT = qw(pingecho); -$VERSION = "2.14"; +$VERSION = "2.16"; # Constants $def_timeout = 5; # Default timeout to wait for a reply -$def_proto = "udp"; # Default protocol to use for pinging +$def_proto = "tcp"; # Default protocol to use for pinging $max_datasize = 1024; # Maximum data bytes in a packet # The data we exchange with the server for the stream protocol $pingstring = "pingschwingping!\n"; @@ -598,7 +598,6 @@ sub ping_udp $ret, # The return value $msg, # Message to be echoed $finish_time, # Time ping should be finished - $ping_time, # Time ping took to complete $done, # Set to 1 when we are done pinging $rbits, # Read bits, filehandles for reading $nfound, # Number of ready filehandles found @@ -617,7 +616,6 @@ sub ping_udp vec($rbits, $self->{"fh"}->fileno(), 1) = 1; $ret = 0; # Default to unreachable $done = 0; - $ping_time = $timeout; $finish_time = &time() + $timeout; # Ping needs to be done by then while (!$done && $timeout > 0) { @@ -648,8 +646,7 @@ sub ping_udp $done = 1; } } - $ping_time -= $timeout; - return wantarray ? ($ret, $ping_time) : $ret; + return $ret; } # Description: Close the connection unless we are using the tcp @@ -670,7 +667,7 @@ __END__ Net::Ping - check a remote host for reachability -$Id: Ping.pm,v 1.27 2002/04/02 02:01:21 rob Exp $ +$Id: Ping.pm,v 1.31 2002/04/11 16:45:06 rob Exp $ =head1 SYNOPSIS diff --git a/lib/Net/Ping/CHANGES b/lib/Net/Ping/CHANGES index 4fb091a..8bf3c91 100644 --- a/lib/Net/Ping/CHANGES +++ b/lib/Net/Ping/CHANGES @@ -1,8 +1,25 @@ CHANGES ------- +2.16 Apr 11 14:00 2002 + - Documentation changes. + - Added INSTALL doc. + - Added README to rpm %doc. + - Added neat MakeMaker constants routine. + - Buttwag around Makefile.PL warnings: + o "the following files are missing in your kit" + o "is not a known MakeMaker parameter name" + +2.15 Apr 06 23:00 2002 + - Added ABSTRACT info. + - Allow for smoother upgrade from + from older Net::Ping versions. + - Change default protocol from udp to tcp + so it will work on most default systems + without any arguments to new(). + 2.14 Apr 01 14:00 2002 - - Added reverse lookup feature. + - Added text ip lookup feature. e@arix.com (Erick Calder) 2.13 Apr 01 14:00 2002 diff --git a/lib/Net/Ping/README b/lib/Net/Ping/README index 68a3631..ff39739 100644 --- a/lib/Net/Ping/README +++ b/lib/Net/Ping/README @@ -1,7 +1,7 @@ NAME Net::Ping - check a remote host for reachability - $Id: Ping.pm,v 1.27 2002/04/02 02:01:21 rob Exp $ + $Id: Ping.pm,v 1.31 2002/04/11 16:45:06 rob Exp $ SYNOPSIS use Net::Ping;