r63211 - in /branches/upstream/libsocket-getaddrinfo-perl/current: Changes META.yml examples/gai.pl lib/Socket/GetAddrInfo.pm lib/Socket/GetAddrInfo.xs
jawnsy-guest at users.alioth.debian.org
jawnsy-guest at users.alioth.debian.org
Sun Oct 3 15:03:50 UTC 2010
Author: jawnsy-guest
Date: Sun Oct 3 15:03:36 2010
New Revision: 63211
URL: http://svn.debian.org/wsvn/pkg-perl/?sc=1&rev=63211
Log:
[svn-upgrade] new version libsocket-getaddrinfo-perl (0.18)
Modified:
branches/upstream/libsocket-getaddrinfo-perl/current/Changes
branches/upstream/libsocket-getaddrinfo-perl/current/META.yml
branches/upstream/libsocket-getaddrinfo-perl/current/examples/gai.pl
branches/upstream/libsocket-getaddrinfo-perl/current/lib/Socket/GetAddrInfo.pm
branches/upstream/libsocket-getaddrinfo-perl/current/lib/Socket/GetAddrInfo.xs
Modified: branches/upstream/libsocket-getaddrinfo-perl/current/Changes
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libsocket-getaddrinfo-perl/current/Changes?rev=63211&op=diff
==============================================================================
--- branches/upstream/libsocket-getaddrinfo-perl/current/Changes (original)
+++ branches/upstream/libsocket-getaddrinfo-perl/current/Changes Sun Oct 3 15:03:36 2010
@@ -1,4 +1,11 @@
Revision history for Socket-GetAddrInfo
+
+0.18 BUGFIXES:
+ * Fix plain number passing for getaddrinfo()'s service on perl
+ versions <5.10.0
+
+0.17 BUGFIXES:
+ * Fix 'protocol' hint to getaddrinfo()
0.16 CHANGES:
* Accept undef as absent host/service name, as well as ""
Modified: branches/upstream/libsocket-getaddrinfo-perl/current/META.yml
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libsocket-getaddrinfo-perl/current/META.yml?rev=63211&op=diff
==============================================================================
--- branches/upstream/libsocket-getaddrinfo-perl/current/META.yml (original)
+++ branches/upstream/libsocket-getaddrinfo-perl/current/META.yml Sun Oct 3 15:03:36 2010
@@ -23,9 +23,9 @@
provides:
Socket::GetAddrInfo:
file: lib/Socket/GetAddrInfo.pm
- version: 0.16
+ version: 0.18
requires:
XSLoader: 0
resources:
license: http://dev.perl.org/licenses/
-version: 0.16
+version: 0.18
Modified: branches/upstream/libsocket-getaddrinfo-perl/current/examples/gai.pl
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libsocket-getaddrinfo-perl/current/examples/gai.pl?rev=63211&op=diff
==============================================================================
--- branches/upstream/libsocket-getaddrinfo-perl/current/examples/gai.pl (original)
+++ branches/upstream/libsocket-getaddrinfo-perl/current/examples/gai.pl Sun Oct 3 15:03:36 2010
@@ -23,6 +23,16 @@
'stream' => sub { $hints{socktype} = SOCK_STREAM },
'dgram' => sub { $hints{socktype} = SOCK_DGRAM },
+ 'proto=s' => sub {
+ my $proto = $_[1];
+ unless( $proto =~ m/^\d+$/ ) {
+ my $protonum = getprotobyname( $proto );
+ defined $protonum or die "No such protocol - $proto\n";
+ $proto = $protonum;
+ }
+ $hints{protocol} = $proto;
+ },
+
'passive' => sub { $hints{flags} ||= AI_PASSIVE },
) or exit 1;
Modified: branches/upstream/libsocket-getaddrinfo-perl/current/lib/Socket/GetAddrInfo.pm
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libsocket-getaddrinfo-perl/current/lib/Socket/GetAddrInfo.pm?rev=63211&op=diff
==============================================================================
--- branches/upstream/libsocket-getaddrinfo-perl/current/lib/Socket/GetAddrInfo.pm (original)
+++ branches/upstream/libsocket-getaddrinfo-perl/current/lib/Socket/GetAddrInfo.pm Sun Oct 3 15:03:36 2010
@@ -15,7 +15,7 @@
my %errstr;
BEGIN {
- our $VERSION = "0.16";
+ our $VERSION = "0.18";
our @EXPORT = qw(
getaddrinfo
Modified: branches/upstream/libsocket-getaddrinfo-perl/current/lib/Socket/GetAddrInfo.xs
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libsocket-getaddrinfo-perl/current/lib/Socket/GetAddrInfo.xs?rev=63211&op=diff
==============================================================================
--- branches/upstream/libsocket-getaddrinfo-perl/current/lib/Socket/GetAddrInfo.xs (original)
+++ branches/upstream/libsocket-getaddrinfo-perl/current/lib/Socket/GetAddrInfo.xs Sun Oct 3 15:03:36 2010
@@ -119,6 +119,7 @@
PREINIT:
char *hostname = NULL;
char *servicename = NULL;
+ STRLEN len;
struct addrinfo hints_s = { 0 };
struct addrinfo *res;
struct addrinfo *res_iter;
@@ -129,7 +130,8 @@
if(SvOK(host) && SvCUR(host))
hostname = SvPV_nolen(host);
- if(SvOK(service) && SvCUR(service))
+ /* This might be numeric so we may have to stringify it */
+ if(SvOK(service) && (SvCUR(service) || SvPV(service, len) && len))
servicename = SvPV_nolen(service);
if(hints && SvOK(hints)) {
@@ -147,7 +149,7 @@
hints_s.ai_family = SvIV(*valp);
if((valp = hv_fetch(hintshash, "socktype", 8, 0)) != NULL)
hints_s.ai_socktype = SvIV(*valp);
- if((valp = hv_fetch(hintshash, "protocol", 5, 0)) != NULL)
+ if((valp = hv_fetch(hintshash, "protocol", 8, 0)) != NULL)
hints_s.ai_protocol = SvIV(*valp);
}
More information about the Pkg-perl-cvs-commits
mailing list