Explicitly denote NI_NUMERICHOST as a function, which seems strange but it makes perl give us the benefit of the doubt

on it beling a valid scoped entity that will be avoided if not imported.
Could have probably used & to acheive the same effect, but it doesn't particularly matter

git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@11500 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
This commit is contained in:
jbjohnso 2012-02-07 13:34:20 +00:00
parent bb2b37563b
commit 9bc1b7f8f1

View File

@ -111,7 +111,7 @@ sub new {
my ($family, $socktype, $protocol, $saddr, $name, $ip, $service);
if ($doipv6) {
($family, $socktype, $protocol, $saddr, $name) = Socket6::getaddrinfo($self->{bmc},623,AF_UNSPEC,SOCK_DGRAM,0);
($ip,$service) = getnameinfo($saddr,Socket6::NI_NUMERICHOST);
($ip,$service) = getnameinfo($saddr,Socket6::NI_NUMERICHOST());
}
unless ($saddr or $bmc_n = inet_aton($self->{bmc})) {
$self->{error} = "Could not resolve ".$self->{bmc}." to an address";
@ -424,7 +424,7 @@ sub route_ipmiresponse {
#($port,$host) = sockaddr_in6($sockaddr);
#$host = inet_ntoa($host);
if ($doipv6) {
($host,$port) = getnameinfo($sockaddr,Socket6::NI_NUMERICHOST);
($host,$port) = getnameinfo($sockaddr,Socket6::NI_NUMERICHOST());
} else {
($port,$host) = sockaddr_in($sockaddr);
$host = inet_ntoa($host);