summaryrefslogtreecommitdiff
path: root/TAO/tao/IIOP_Endpoint.cpp
diff options
context:
space:
mode:
authorPhil Mesnier <mesnier_p@ociweb.com>2014-01-10 20:09:04 +0000
committerPhil Mesnier <mesnier_p@ociweb.com>2014-01-10 20:09:04 +0000
commit117f8048913d53d659f960e672381c43ca5060bb (patch)
tree6379e439560c211e729d7beaa1e8eed7083f6f8e /TAO/tao/IIOP_Endpoint.cpp
parent16d47b590735210691c55d10589e6a5c856ca0a2 (diff)
downloadATCD-117f8048913d53d659f960e672381c43ca5060bb.tar.gz
Fri Jan 10 20:07:11 UTC 2014 Phil Mesnier <mesnier_p@ociweb.com>
* tao/IIOP_Endpoint.cpp: Fix to work around problem exposed by a configuration issue on windows 7. Even though there were apparently no IPv6 interfaces, the system still successfully resolved an IPv6 address using ::gethostbyname(). Since there were no usable interfaces, a subsequent attempt to use that address failed, crashing the application. This is not a universal problem, and the exact troubling configuration is yet to be determined.
Diffstat (limited to 'TAO/tao/IIOP_Endpoint.cpp')
-rw-r--r--TAO/tao/IIOP_Endpoint.cpp15
1 files changed, 8 insertions, 7 deletions
diff --git a/TAO/tao/IIOP_Endpoint.cpp b/TAO/tao/IIOP_Endpoint.cpp
index be553ed041b..6fafa5711c6 100644
--- a/TAO/tao/IIOP_Endpoint.cpp
+++ b/TAO/tao/IIOP_Endpoint.cpp
@@ -369,18 +369,19 @@ TAO_IIOP_Endpoint::object_addr_i (void) const
// (or it's an IPv4 address) and the address is *not* an IPv6
// decimal address try to resolve it as an IPv4 address.
if ((is_ipv4_decimal_ ||
+ (!ACE::ipv6_enabled () ||
this->object_addr_.set (this->port_,
this->host_.in (),
1,
- AF_INET6) == -1) &&
+ AF_INET6) == -1)) &&
(this->is_ipv6_decimal_ ||
- this->object_addr_.set (this->port_,
- this->host_.in (),
- 1,
- AF_INET) == -1))
+ this->object_addr_.set (this->port_,
+ this->host_.in (),
+ 1,
+ AF_INET) == -1))
#else
- if (this->object_addr_.set (this->port_,
- this->host_.in ()) == -1)
+ if (this->object_addr_.set (this->port_,
+ this->host_.in ()) == -1)
#endif
{
// If this call fails, it most likely due a hostname