@ISA = qw(Exporter);
@EXPORT = qw(pingecho);
-$VERSION = "2.31_03";
+$VERSION = "2.31_04";
sub SOL_IP { 0; };
sub IP_TOS { 1; };
if ($^O =~ /Win32/i) {
# Hack to avoid this Win32 spewage:
# Your vendor has not defined POSIX macro ECONNREFUSED
- *ECONNREFUSED = sub {10061;}; # "Unknown Error" Special Win32 Response?
- *ENOTCONN = sub {10057;};
- *ECONNRESET = sub {10054;};
- *EINPROGRESS = sub {10036;};
- *EWOULDBLOCK = sub {10035;};
+ *ECONNREFUSED = sub() {10061;}; # "Unknown Error" Special Win32 Response?
+ *ENOTCONN = sub() {10057;};
+ *ECONNRESET = sub() {10054;};
+ *EINPROGRESS = sub() {10036;};
+ *EWOULDBLOCK = sub() {10035;};
# $syn_forking = 1; # XXX possibly useful in < Win2K ?
};
while (1) {
$gran = $t if $gran > $t;
my $nfound = select($_[0], $_[1], $_[2], $gran);
+ undef $nfound if $nfound == -1;
$t -= $gran;
return $nfound if $nfound or !defined($nfound) or $t <= 0;
}
}
else {
- return select($_[0], $_[1], $_[2], $_[3]);
+ my $nfound = select($_[0], $_[1], $_[2], $_[3]);
+ undef $nfound if $nfound == -1;
+ return $nfound;
}
}
{
$nfound = mselect((my $rout=$rbits), undef, undef, $timeout); # Wait for packet
$timeout = $finish_time - &time(); # Get remaining time
- if ($nfound == -1) # Hmm, a strange error
+ if (!defined($nfound)) # Hmm, a strange error
{
$ret = undef;
$done = 1;