X-Git-Url: http://git.salome-platform.org/gitweb/?p=modules%2Fsmesh.git;a=blobdiff_plain;f=src%2FSMESH_I%2FSMESH_Gen_Session_i.cxx;h=cb091f7b75a18d544bd944c810dc35b147e7878b;hp=f2577d7feb0e585cd240c0496154788837a5819e;hb=499f29d24922cec66e41b41a0039a954993bc6df;hpb=ed49807f170bded5dffd1f25be7b8c5799cdab6b diff --git a/src/SMESH_I/SMESH_Gen_Session_i.cxx b/src/SMESH_I/SMESH_Gen_Session_i.cxx index f2577d7fe..cb091f7b7 100644 --- a/src/SMESH_I/SMESH_Gen_Session_i.cxx +++ b/src/SMESH_I/SMESH_Gen_Session_i.cxx @@ -1,4 +1,4 @@ -// Copyright (C) 2021 CEA/DEN, EDF R&D +// Copyright (C) 2021-2022 CEA/DEN, EDF R&D // // This library is free software; you can redistribute it and/or // modify it under the terms of the GNU Lesser General Public @@ -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() ; + } } }