diff options
author | bala <balanatarajan@users.noreply.github.com> | 2003-11-06 23:08:03 +0000 |
---|---|---|
committer | bala <balanatarajan@users.noreply.github.com> | 2003-11-06 23:08:03 +0000 |
commit | 3eacedf045ce0b38511c2816df6277f80895917c (patch) | |
tree | ac73eb8e919c475e99602d5544f49b0c648fe346 /ace/INET_Addr.cpp | |
parent | dd10b790f4eff70bcc1ca1a3e49aa803e6b4d18c (diff) | |
download | ATCD-3eacedf045ce0b38511c2816df6277f80895917c.tar.gz |
ChangeLogTag:Thu Nov 6 17:04:22 2003 Balachandran Natarajan <bala@dre.vanderbilt.edu>
Diffstat (limited to 'ace/INET_Addr.cpp')
-rw-r--r-- | ace/INET_Addr.cpp | 17 |
1 files changed, 7 insertions, 10 deletions
diff --git a/ace/INET_Addr.cpp b/ace/INET_Addr.cpp index a01b270554f..7828fff1701 100644 --- a/ace/INET_Addr.cpp +++ b/ace/INET_Addr.cpp @@ -210,7 +210,7 @@ ACE_INET_Addr::ACE_INET_Addr (const ACE_INET_Addr &sa) int ACE_INET_Addr::set (u_short port_number, ACE_UINT32 inet_address, - int encode, + int encode, int map) { ACE_TRACE ("ACE_INET_Addr::set"); @@ -792,7 +792,7 @@ int ACE_INET_Addr::set_address (const char *ip_addr, ip4 = ACE_HTONL (ip4); - if (this->get_type () == AF_INET) { + if (this->get_type () == AF_INET && map == 0) { this->base_set (AF_INET, sizeof (this->inet_addr_.in4_)); this->inet_addr_.in4_.sin_family = AF_INET; this->set_size (sizeof (this->inet_addr_.in4_)); @@ -803,7 +803,7 @@ int ACE_INET_Addr::set_address (const char *ip_addr, #if defined (ACE_HAS_IPV6) else if (map == 0) { - this->set_type (AF_INET); + // this->set_type (AF_INET); this->base_set (AF_INET, sizeof (this->inet_addr_.in4_)); this->inet_addr_.in4_.sin_family = AF_INET; this->set_size (sizeof (this->inet_addr_.in4_)); @@ -851,10 +851,7 @@ int ACE_INET_Addr::set_address (const char *ip_addr, &newaddress, sizeof (newaddress)); } -#else - ACE_UNUSED_ARG (map); #endif /* ACE_HAS_IPV6 */ - return 0; } /* end if (len == 4) */ #if defined (ACE_HAS_IPV6) @@ -888,14 +885,14 @@ int ACE_INET_Addr::set_address (const char *ip_addr, } #if defined (__linux__) && defined (ACE_HAS_IPV6) -int +int ACE_INET_Addr::set_interface (const char *intf_name) { - if (this->get_type () == PF_INET6 && + if (this->get_type () == PF_INET6 && IN6_IS_ADDR_LINKLOCAL (&this->inet_addr_.in6_.sin6_addr)) { - this->inet_addr_.in6_.sin6_scope_id = - ACE_OS::if_nametoindex (intf_name); + this->inet_addr_.in6_.sin6_scope_id = + ACE_OS::if_nametoindex (intf_name); // check to see if the interface lookup succeeded if (this->inet_addr_.in6_.sin6_scope_id != 0) |