X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FHOMARD_I%2FHOMARD_Gen_i_Session.cxx;h=0275923cbbf61c96b0fd67c8d5a7b98b5ba145e4;hb=refs%2Ftags%2FV9_13_0b1;hp=96c4a3799715f6c89cf34c3361c35a2f907d7f5f;hpb=ce53f09e6f7b06ec9e1dd19ca1c7d8ad923edd22;p=modules%2Fhomard.git diff --git a/src/HOMARD_I/HOMARD_Gen_i_Session.cxx b/src/HOMARD_I/HOMARD_Gen_i_Session.cxx index 96c4a379..0275923c 100644 --- a/src/HOMARD_I/HOMARD_Gen_i_Session.cxx +++ b/src/HOMARD_I/HOMARD_Gen_i_Session.cxx @@ -1,4 +1,4 @@ -// Copyright (C) 2021 CEA/DEN, EDF R&D +// Copyright (C) 2021-2024 CEA, EDF // // This library is free software; you can redistribute it and/or // modify it under the terms of the GNU Lesser General Public @@ -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(); + } } }