From: Anthony Geay Date: Tue, 25 Jan 2022 06:52:58 +0000 (+0100) Subject: [tuleap26948] : ssl990 X-Git-Tag: V9_9_0a1 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=57452bc621e756c3ecb5d07b904597be5871e883;p=modules%2Fhomard.git [tuleap26948] : ssl990 --- diff --git a/src/HOMARD_I/HOMARD_Gen_i_Session.cxx b/src/HOMARD_I/HOMARD_Gen_i_Session.cxx index 96c4a379..9c5daa2e 100644 --- a/src/HOMARD_I/HOMARD_Gen_i_Session.cxx +++ b/src/HOMARD_I/HOMARD_Gen_i_Session.cxx @@ -46,6 +46,7 @@ SMESH::SMESH_Gen_var HOMARD_Gen_i_Session::retrieveSMESHInst() const } //============================================================================= +#include "HOMARD_Gen_i_No_Session.hxx" extern "C" { HOMARDENGINE_EXPORT @@ -56,7 +57,17 @@ extern "C" const char* interfaceName) { MESSAGE("PortableServer::ObjectId* HOMARDEngine_factory()"); - HOMARD_Gen_i_Session* myHOMARD_Gen = new HOMARD_Gen_i_Session(orb, poa, contId, instanceName, interfaceName); - return myHOMARD_Gen->getId(); + CORBA::Object_var o = poa->id_to_reference(*contId); + Engines::Container_var cont = Engines::Container::_narrow(o); + if(cont->is_SSL_mode()) + { + HOMARD_Gen_i_No_Session* myHOMARD_Gen = new HOMARD_Gen_i_No_Session(orb, poa, contId, instanceName, interfaceName); + return myHOMARD_Gen->getId(); + } + else + { + HOMARD_Gen_i_Session* myHOMARD_Gen = new HOMARD_Gen_i_Session(orb, poa, contId, instanceName, interfaceName); + return myHOMARD_Gen->getId(); + } } }