-Fix mistakes in last checkin

git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@8748 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
This commit is contained in:
jbjohnso 2011-01-26 15:44:42 +00:00
parent d0c5d7439b
commit 0544006d78

View File

@ -224,13 +224,13 @@ sub getipaddr
if ($socket6support) # the getaddrinfo and getnameinfo supports both IPv4 and IPv6
{
my @returns;
my $family=AF_UNSPEC;
my $reqfamily=AF_UNSPEC;
if ($extraarguments{OnlyV6}) {
$family=AF_INET6;
$reqfamily=AF_INET6;
} elsif ($extraarguments{OnlyV4}) {
$family=AF_INET;
$reqfamily=AF_INET;
}
my @addrinfo = Socket6::getaddrinfo($iporhost,0,$family,SOCK_STREAM,6);
my @addrinfo = Socket6::getaddrinfo($iporhost,0,$reqfamily,SOCK_STREAM,6);
my ($family, $socket, $protocol, $ip, $name) = splice(@addrinfo,0,5);
while ($ip)
{
@ -245,7 +245,7 @@ sub getipaddr
} else {
push @returns,(Socket6::getnameinfo($ip, Socket6::NI_NUMERICHOST()))[0];
}
if (scalar @addrinfo and $extraargumests{GetAllAddresses}) {
if (scalar @addrinfo and $extraarguments{GetAllAddresses}) {
($family, $socket, $protocol, $ip, $name) = splice(@addrinfo,0,5);
} else {
$ip=0;