diff options
author | Benoit Foucher <benoit@zeroc.com> | 2017-04-10 19:33:17 +0200 |
---|---|---|
committer | Benoit Foucher <benoit@zeroc.com> | 2017-04-10 19:33:17 +0200 |
commit | 1fa97b799b91fa6b0842e3267fec3d6e3a240df5 (patch) | |
tree | 1bc3abfddbcb66b51c776da15e2d88586ca2bbf4 /cpp/src/IceSSL/EndpointI.cpp | |
parent | Fix (ICE-7771) - UWP build fails, missing targets file (diff) | |
download | ice-1fa97b799b91fa6b0842e3267fec3d6e3a240df5.tar.bz2 ice-1fa97b799b91fa6b0842e3267fec3d6e3a240df5.tar.xz ice-1fa97b799b91fa6b0842e3267fec3d6e3a240df5.zip |
Fixed ICE-7755 - listen on all IPs associated with a DNS name
Diffstat (limited to 'cpp/src/IceSSL/EndpointI.cpp')
-rw-r--r-- | cpp/src/IceSSL/EndpointI.cpp | 39 |
1 files changed, 36 insertions, 3 deletions
diff --git a/cpp/src/IceSSL/EndpointI.cpp b/cpp/src/IceSSL/EndpointI.cpp index 972c220b7dd..2300bffa4cb 100644 --- a/cpp/src/IceSSL/EndpointI.cpp +++ b/cpp/src/IceSSL/EndpointI.cpp @@ -207,12 +207,45 @@ IceSSL::EndpointI::endpoint(const IceInternal::EndpointIPtr& delEndp) const } vector<IceInternal::EndpointIPtr> -IceSSL::EndpointI::expand() const +IceSSL::EndpointI::expandIfWildcard() const { - vector<IceInternal::EndpointIPtr> endps = _delegate->expand(); + vector<IceInternal::EndpointIPtr> endps = _delegate->expandIfWildcard(); for(vector<IceInternal::EndpointIPtr>::iterator p = endps.begin(); p != endps.end(); ++p) { - *p = p->get() == _delegate.get() ? ICE_SHARED_FROM_CONST_THIS(EndpointI) : ICE_MAKE_SHARED(EndpointI, _instance, *p); + if(p->get() == _delegate.get()) + { + *p = ICE_SHARED_FROM_CONST_THIS(EndpointI); + } + else + { + *p = ICE_MAKE_SHARED(EndpointI, _instance, *p); + } + } + return endps; +} + +vector<IceInternal::EndpointIPtr> +IceSSL::EndpointI::expandHost(IceInternal::EndpointIPtr& publish) const +{ + vector<IceInternal::EndpointIPtr> endps = _delegate->expandHost(publish); + if(publish.get() == _delegate.get()) + { + publish = ICE_SHARED_FROM_CONST_THIS(EndpointI); + } + else if(publish.get()) + { + publish = ICE_MAKE_SHARED(EndpointI, _instance, publish); + } + for(vector<IceInternal::EndpointIPtr>::iterator p = endps.begin(); p != endps.end(); ++p) + { + if(p->get() == _delegate.get()) + { + *p = ICE_SHARED_FROM_CONST_THIS(EndpointI); + } + else + { + *p = ICE_MAKE_SHARED(EndpointI, _instance, *p); + } } return endps; } |