summaryrefslogtreecommitdiff
path: root/TAO/orbsvcs/orbsvcs/SSLIOP/SSLIOP_Transport.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'TAO/orbsvcs/orbsvcs/SSLIOP/SSLIOP_Transport.cpp')
-rw-r--r--TAO/orbsvcs/orbsvcs/SSLIOP/SSLIOP_Transport.cpp20
1 files changed, 15 insertions, 5 deletions
diff --git a/TAO/orbsvcs/orbsvcs/SSLIOP/SSLIOP_Transport.cpp b/TAO/orbsvcs/orbsvcs/SSLIOP/SSLIOP_Transport.cpp
index a8adc8ff016..58a45f65ce4 100644
--- a/TAO/orbsvcs/orbsvcs/SSLIOP/SSLIOP_Transport.cpp
+++ b/TAO/orbsvcs/orbsvcs/SSLIOP/SSLIOP_Transport.cpp
@@ -329,7 +329,11 @@ TAO_SSLIOP_Transport::get_listen_point (
ACE_dynamic_cast (TAO_SSLIOP_Acceptor *,
acceptor);
- // Get the array of endpoints serviced by <iiop_acceptor>
+ if (ssliop_acceptor == 0)
+ return -1;
+
+ // Get the array of IIOP (not SSLIOP!) endpoints serviced by the
+ // SSLIOP_Acceptor.
const ACE_INET_Addr *endpoint_addr =
ssliop_acceptor->endpoints ();
@@ -337,6 +341,10 @@ TAO_SSLIOP_Transport::get_listen_point (
size_t count =
ssliop_acceptor->endpoint_count ();
+ // The SSL port is stored in the SSLIOP::SSL component associated
+ // with the SSLIOP_Acceptor.
+ const SSLIOP::SSL &ssl = ssliop_acceptor->ssl_component ();
+
// Get the local address of the connection
ACE_INET_Addr local_addr;
@@ -365,9 +373,7 @@ TAO_SSLIOP_Transport::get_listen_point (
-1);
}
- for (size_t index = 0;
- index != count;
- index++)
+ for (size_t index = 0; index < count; ++index)
{
if (local_addr.get_ip_address()
== endpoint_addr[index].get_ip_address())
@@ -382,7 +388,11 @@ TAO_SSLIOP_Transport::get_listen_point (
// same interface
IIOP::ListenPoint &point = listen_point_list[len];
point.host = CORBA::string_dup (local_interface.in ());
- point.port = endpoint_addr[index].get_port_number ();
+
+ // All endpoints, if more than one, serviced by the
+ // SSLIOP_Acceptor should be listening on the same port (due
+ // to the bind to the INADDR_ANY address).
+ point.port = ssl.port;
}
}