diff options
Diffstat (limited to 'cpp/src/IceBT/PluginI.cpp')
-rw-r--r-- | cpp/src/IceBT/PluginI.cpp | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/cpp/src/IceBT/PluginI.cpp b/cpp/src/IceBT/PluginI.cpp index 07a6fb67c42..c8f2882bbfb 100644 --- a/cpp/src/IceBT/PluginI.cpp +++ b/cpp/src/IceBT/PluginI.cpp @@ -59,13 +59,21 @@ registerIceBT(bool loadOnInitialize) IceBT::PluginI::PluginI(const Ice::CommunicatorPtr& com) : _engine(new Engine(com)) { + IceInternal::ProtocolPluginFacadePtr pluginFacade = IceInternal::getProtocolPluginFacade(com); + // // Register the endpoint factory. We have to do this now, rather // than in initialize, because the communicator may need to // interpret proxies before the plug-in is fully initialized. // - IceInternal::EndpointFactoryPtr btFactory = new EndpointFactoryI(new Instance(_engine, EndpointType, "bt")); - IceInternal::getProtocolPluginFacade(com)->addEndpointFactory(btFactory); + pluginFacade->addEndpointFactory(new EndpointFactoryI(new Instance(_engine, BTEndpointType, "bt"))); + + IceInternal::EndpointFactoryPtr sslFactory = pluginFacade->getEndpointFactory(SSLEndpointType); + if(sslFactory) + { + InstancePtr instance = new Instance(_engine, BTSEndpointType, "bts"); + pluginFacade->addEndpointFactory(sslFactory->clone(instance, new EndpointFactoryI(instance))); + } } void |