summaryrefslogtreecommitdiff
path: root/cpp/src/IceSSL/EndpointI.cpp
diff options
context:
space:
mode:
authorBenoit Foucher <benoit@zeroc.com>2017-04-12 14:03:58 +0200
committerBenoit Foucher <benoit@zeroc.com>2017-04-12 14:03:58 +0200
commit6ca0bfa03dfc32364509e0d0ac0bbba3f2f69d0d (patch)
tree6caee9a926ca73042b0238f69693d4a6346678e8 /cpp/src/IceSSL/EndpointI.cpp
parentMinor CHANGELOG-3.7 fixes (diff)
downloadice-6ca0bfa03dfc32364509e0d0ac0bbba3f2f69d0d.tar.bz2
ice-6ca0bfa03dfc32364509e0d0ac0bbba3f2f69d0d.tar.xz
ice-6ca0bfa03dfc32364509e0d0ac0bbba3f2f69d0d.zip
Minor fixes to endpoint code
Diffstat (limited to 'cpp/src/IceSSL/EndpointI.cpp')
-rw-r--r--cpp/src/IceSSL/EndpointI.cpp9
1 files changed, 8 insertions, 1 deletions
diff --git a/cpp/src/IceSSL/EndpointI.cpp b/cpp/src/IceSSL/EndpointI.cpp
index 2300bffa4cb..69705dcbcd8 100644
--- a/cpp/src/IceSSL/EndpointI.cpp
+++ b/cpp/src/IceSSL/EndpointI.cpp
@@ -203,7 +203,14 @@ IceSSL::EndpointI::acceptor(const string& adapterName) const
EndpointIPtr
IceSSL::EndpointI::endpoint(const IceInternal::EndpointIPtr& delEndp) const
{
- return ICE_MAKE_SHARED(EndpointI, _instance, delEndp);
+ if(delEndp.get() == _delegate.get())
+ {
+ return ICE_DYNAMIC_CAST(EndpointI, ICE_SHARED_FROM_CONST_THIS(EndpointI));
+ }
+ else
+ {
+ return ICE_MAKE_SHARED(EndpointI, _instance, delEndp);
+ }
}
vector<IceInternal::EndpointIPtr>