diff options
Diffstat (limited to 'cpp/src/Ice/WSEndpoint.cpp')
-rw-r--r-- | cpp/src/Ice/WSEndpoint.cpp | 39 |
1 files changed, 36 insertions, 3 deletions
diff --git a/cpp/src/Ice/WSEndpoint.cpp b/cpp/src/Ice/WSEndpoint.cpp index 974f998412a..c19842d652f 100644 --- a/cpp/src/Ice/WSEndpoint.cpp +++ b/cpp/src/Ice/WSEndpoint.cpp @@ -232,12 +232,45 @@ IceInternal::WSEndpoint::endpoint(const EndpointIPtr& delEndp) const } vector<EndpointIPtr> -IceInternal::WSEndpoint::expand() const +IceInternal::WSEndpoint::expandIfWildcard() const { - vector<EndpointIPtr> endps = _delegate->expand(); + vector<EndpointIPtr> endps = _delegate->expandIfWildcard(); for(vector<EndpointIPtr>::iterator p = endps.begin(); p != endps.end(); ++p) { - *p = p->get() == _delegate.get() ? ICE_SHARED_FROM_CONST_THIS(WSEndpoint) : ICE_MAKE_SHARED(WSEndpoint, _instance, *p, _resource); + if(p->get() == _delegate.get()) + { + *p = ICE_SHARED_FROM_CONST_THIS(WSEndpoint); + } + else + { + *p = ICE_MAKE_SHARED(WSEndpoint, _instance, *p, _resource); + } + } + return endps; +} + +vector<EndpointIPtr> +IceInternal::WSEndpoint::expandHost(EndpointIPtr& publish) const +{ + vector<EndpointIPtr> endps = _delegate->expandHost(publish); + if(publish.get() == _delegate.get()) + { + publish = ICE_SHARED_FROM_CONST_THIS(WSEndpoint); + } + else if(publish.get()) + { + publish = ICE_MAKE_SHARED(WSEndpoint, _instance, publish, _resource); + } + for(vector<EndpointIPtr>::iterator p = endps.begin(); p != endps.end(); ++p) + { + if(p->get() == _delegate.get()) + { + *p = ICE_SHARED_FROM_CONST_THIS(WSEndpoint); + } + else + { + *p = ICE_MAKE_SHARED(WSEndpoint, _instance, *p, _resource); + } } return endps; } |