ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/AnyEvent/lib/AnyEvent/Socket.pm
(Generate patch)

Comparing AnyEvent/lib/AnyEvent/Socket.pm (file contents):
Revision 1.39 by root, Thu May 29 00:27:06 2008 UTC vs.
Revision 1.40 by root, Thu May 29 00:30:15 2008 UTC

424 $cv->begin; 424 $cv->begin;
425 for my $idx (0 .. $#target) { 425 for my $idx (0 .. $#target) {
426 my ($node, $port) = @{ $target[$idx] }; 426 my ($node, $port) = @{ $target[$idx] };
427 427
428 if (my $noden = parse_address $node) { 428 if (my $noden = parse_address $node) {
429 my $af = address_family $noden;
430
429 if (4 == length $noden && $family != 6) { 431 if ($af == AF_INET && $family != 6) {
430 push @res, [$idx, "ipv4", [AF_INET, $type, $proton, 432 push @res, [$idx, "ipv4", [AF_INET, $type, $proton,
431 pack_sockaddr $port, $noden]] 433 pack_sockaddr $port, $noden]]
432 } 434 }
433 435
434 if (16 == length $noden && $family != 4) { 436 if ($af == AF_INET6 && $family != 4) {
435 push @res, [$idx, "ipv6", [AF_INET6, $type, $proton, 437 push @res, [$idx, "ipv6", [AF_INET6, $type, $proton,
436 pack_sockaddr $port, $noden]] 438 pack_sockaddr $port, $noden]]
437 } 439 }
438 } else { 440 } else {
439 # ipv4 441 # ipv4

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines