diff options
author | Phil Mesnier <mesnier_p@ociweb.com> | 2006-09-20 21:05:49 +0000 |
---|---|---|
committer | Phil Mesnier <mesnier_p@ociweb.com> | 2006-09-20 21:05:49 +0000 |
commit | d9fa726dde12379a630ddb503027c21d2d55eea3 (patch) | |
tree | 22d8429022855f6f4f80d9912694e23c7b0079d0 | |
parent | ede333c0b16d3058f264b2e50b6e7c75ea8ab199 (diff) | |
download | ATCD-d9fa726dde12379a630ddb503027c21d2d55eea3.tar.gz |
Wed Sep 20 21:02:14 UTC 2006 Phil Mesnier <mesnier_p@ociweb.com>
-rw-r--r-- | TAO/ChangeLog | 7 | ||||
-rw-r--r-- | TAO/tao/IIOP_Acceptor.cpp | 13 |
2 files changed, 16 insertions, 4 deletions
diff --git a/TAO/ChangeLog b/TAO/ChangeLog index c0335abf6f5..6804e418e97 100644 --- a/TAO/ChangeLog +++ b/TAO/ChangeLog @@ -1,3 +1,10 @@ +Wed Sep 20 21:02:14 UTC 2006 Phil Mesnier <mesnier_p@ociweb.com> + + * tao/IIOP_Acceptor.cpp: + + Make sure the port_separator_loc value is used to compute the + string length only when it is not 0. + Wed Sep 20 01:10:58 UTC 2006 Iliyan Jeliazkov <iliyan@ociweb.com> * tao/default_resource.cpp: diff --git a/TAO/tao/IIOP_Acceptor.cpp b/TAO/tao/IIOP_Acceptor.cpp index 32744f4cbe2..f701b438222 100644 --- a/TAO/tao/IIOP_Acceptor.cpp +++ b/TAO/tao/IIOP_Acceptor.cpp @@ -705,10 +705,15 @@ TAO_IIOP_Acceptor::parse_address (const char *address, } else if (!host_defaulted) { - // Extract out just the host part of the address. - size_t const len = port_separator_loc - address; - ACE_OS::memcpy (tmp_host, address, len); - tmp_host[len] = '\0'; + if (port_separator_loc != 0) + { + // Extract out just the host part of the address. + size_t const len = port_separator_loc - address; + ACE_OS::memcpy (tmp_host, address, len); + tmp_host[len] = '\0'; + } + else + ACE_OS::strcpy (tmp_host, address); } #endif /* ACE_HAS_IPV6 */ if (!ipv6_in_host && !host_defaulted) |