]> SALOME platform Git repositories - modules/geom.git/commitdiff
Salome HOME
[tuleap26948] : fix of Dump study does not work after study reopening
authorAnthony Geay <anthony.geay@edf.fr>
Mon, 24 Jan 2022 09:04:28 +0000 (10:04 +0100)
committerAnthony Geay <anthony.geay@edf.fr>
Mon, 24 Jan 2022 09:48:24 +0000 (10:48 +0100)
src/GEOM_I/GEOM_Gen_Session_i.cc

index 6c8528309320065a16d9958cfc9c9d083f32debd..ee2ae599f20db1f73c3d20b394615afa8a240f4f 100644 (file)
@@ -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();
+    }
   }
 }