diff options
author | Benoit Foucher <benoit@zeroc.com> | 2017-04-27 13:05:25 +0200 |
---|---|---|
committer | Benoit Foucher <benoit@zeroc.com> | 2017-04-27 13:05:25 +0200 |
commit | c5ee6fd5310199110dae6b2d01decbd20174d8db (patch) | |
tree | daf558482821eb3a1ffd496b06ba8bcc2edce841 /cpp/src/Ice/EndpointFactoryManager.cpp | |
parent | Extra whitespace (diff) | |
download | ice-c5ee6fd5310199110dae6b2d01decbd20174d8db.tar.bz2 ice-c5ee6fd5310199110dae6b2d01decbd20174d8db.tar.xz ice-c5ee6fd5310199110dae6b2d01decbd20174d8db.zip |
Fixed ICE-6680 - WS transports are now provided by a separate IceWS plugin
Diffstat (limited to 'cpp/src/Ice/EndpointFactoryManager.cpp')
-rw-r--r-- | cpp/src/Ice/EndpointFactoryManager.cpp | 17 |
1 files changed, 16 insertions, 1 deletions
diff --git a/cpp/src/Ice/EndpointFactoryManager.cpp b/cpp/src/Ice/EndpointFactoryManager.cpp index 8fa1e614769..a2105da4274 100644 --- a/cpp/src/Ice/EndpointFactoryManager.cpp +++ b/cpp/src/Ice/EndpointFactoryManager.cpp @@ -30,6 +30,15 @@ IceInternal::EndpointFactoryManager::EndpointFactoryManager(const InstancePtr& i } void +IceInternal::EndpointFactoryManager::initialize() const +{ + for(vector<EndpointFactoryPtr>::size_type i = 0; i < _factories.size(); i++) + { + _factories[i]->initialize(); + } +} + +void IceInternal::EndpointFactoryManager::add(const EndpointFactoryPtr& factory) { IceUtil::Mutex::Lock sync(*this); // TODO: Necessary? @@ -188,7 +197,13 @@ IceInternal::EndpointFactoryManager::read(InputStream* s) const { e = factory->read(s); } - else + // + // If the factory failed to read the endpoint, return an opaque endpoint. This can + // occur if for example the factory delegates to another factory and this factory + // isn't available. In this case, the factory needs to make sure the stream position + // is preserved for reading the opaque endpoint. + // + if(!e) { e = ICE_MAKE_SHARED(OpaqueEndpointI, type, s); } |