From 8df37edc3d38a8630fac0ab37b5e557e4828e339 Mon Sep 17 00:00:00 2001 From: Anthony Geay Date: Mon, 24 Jan 2022 10:04:28 +0100 Subject: [PATCH] [tuleap26948] : fix of Dump study does not work after study reopening --- src/GEOM_I/GEOM_Gen_Session_i.cc | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/src/GEOM_I/GEOM_Gen_Session_i.cc b/src/GEOM_I/GEOM_Gen_Session_i.cc index 6c8528309..ee2ae599f 100644 --- a/src/GEOM_I/GEOM_Gen_Session_i.cc +++ b/src/GEOM_I/GEOM_Gen_Session_i.cc @@ -50,6 +50,8 @@ SALOMEDS::Study_var GEOM_Gen_Session_i::getStudyServant() return aStudy; } +#include "GEOM_Gen_No_Session_i.hh" + extern "C" { GEOM_I_EXPORT PortableServer::ObjectId* GEOMEngine_factory(CORBA::ORB_ptr orb, @@ -58,7 +60,17 @@ extern "C" const char* instanceName, const char* interfaceName) { - GEOM_Gen_Session_i* myGEOM_Gen_i = new GEOM_Gen_Session_i(orb, poa, contId, instanceName, interfaceName); - return myGEOM_Gen_i->getId(); + CORBA::Object_var o = poa->id_to_reference(*contId); + Engines::Container_var cont = Engines::Container::_narrow(o); + if(cont->is_SSL_mode()) + { + GEOM_Gen_No_Session_i* myGEOM_Gen_i = new GEOM_Gen_No_Session_i(orb, poa, contId, instanceName, interfaceName); + return myGEOM_Gen_i->getId(); + } + else + { + GEOM_Gen_Session_i* myGEOM_Gen_i = new GEOM_Gen_Session_i(orb, poa, contId, instanceName, interfaceName); + return myGEOM_Gen_i->getId(); + } } } -- 2.39.2