From: Jarkko Hietaniemi Date: Wed, 20 Jun 2001 11:51:10 +0000 (+0000) Subject: Re: Bug in IO::Socket::INET module (repeat) X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=a957f605ba75f16b2eb6f85e3cfffa325e8c9168;p=p5sagit%2Fp5-mst-13.2.git Re: Bug in IO::Socket::INET module (repeat) From: Graham Barr Date: Wed, 20 Jun 2001 11:05:49 +0100 Message-ID: <20010620110549.I19188@pobox.com> reported in Subject: Bug in IO::Socket::INET module (repeat) From: "Harmon S. Nine" Date: Tue, 19 Jun 2001 09:41:35 -0400 Message-ID: <3B2F568F.8080605@netarx.com> The bug was that the IO::Socket::INET constructor did not allow a 'LocalPort' of 0. p4raw-id: //depot/perl@10746 --- diff --git a/ext/IO/lib/IO/Socket/INET.pm b/ext/IO/lib/IO/Socket/INET.pm index 56dd7a2..abe7693 100644 --- a/ext/IO/lib/IO/Socket/INET.pm +++ b/ext/IO/lib/IO/Socket/INET.pm @@ -63,7 +63,7 @@ sub _sock_info { @serv = getservbyname($port, $proto[0] || "") if ($port =~ m,\D,); - $port = $pnum || $serv[2] || $defport || undef; + $port = $serv[2] || $defport || $pnum; unless (defined $port) { $@ = "Bad service '$origport'"; return;