X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FSMESH_I%2FSMESH_Gen_Session_i.cxx;h=cb091f7b75a18d544bd944c810dc35b147e7878b;hb=ee7ca3d826183e462048423d2416e96872d06620;hp=f2577d7feb0e585cd240c0496154788837a5819e;hpb=b8cc25cce5e1bd0bf006b25d4a53d60c4767114c;p=modules%2Fsmesh.git 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() ; + } } }