From: Anthony Geay Date: Mon, 24 Jan 2022 10:50:00 +0000 (+0100) Subject: [tuleap26948] : fix of Dump study does not work after study reopening X-Git-Tag: V9_9_0a1~16 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=a9cddd8ce9b9c127920af53408846d940cb59d63;p=modules%2Fsmesh.git [tuleap26948] : fix of Dump study does not work after study reopening --- diff --git a/src/SMESH_I/SMESH_Gen_Session_i.cxx b/src/SMESH_I/SMESH_Gen_Session_i.cxx index f2577d7fe..de34b3814 100644 --- a/src/SMESH_I/SMESH_Gen_Session_i.cxx +++ b/src/SMESH_I/SMESH_Gen_Session_i.cxx @@ -49,6 +49,8 @@ SALOME_ModuleCatalog::ModuleCatalog_var SMESH_Gen_Session_i::getModuleCatalog() return aCat; } +#include "SMESH_Gen_No_Session_i.hxx" + extern "C" { SMESH_I_EXPORT PortableServer::ObjectId* SMESHEngine_factory( CORBA::ORB_ptr orb, @@ -57,7 +59,17 @@ extern "C" const char* instanceName, const char* interfaceName ) { - SMESH_Gen_Session_i* aSMESHGen = new SMESH_Gen_Session_i(orb, poa, contId, instanceName, interfaceName); - return aSMESHGen->getId() ; + CORBA::Object_var o = poa->id_to_reference(*contId); + Engines::Container_var cont = Engines::Container::_narrow(o); + if(cont->is_SSL_mode()) + { + SMESH_Gen_No_Session_i* aSMESHGen = new SMESH_Gen_No_Session_i(orb, poa, contId, instanceName, interfaceName); + return aSMESHGen->getId() ; + } + else + { + SMESH_Gen_Session_i* aSMESHGen = new SMESH_Gen_Session_i(orb, poa, contId, instanceName, interfaceName); + return aSMESHGen->getId() ; + } } }