]> SALOME platform Git repositories - modules/gui.git/commitdiff
Salome HOME
[tuleap29134] : fix pvsimple import in SSL mode V9_9_0a2
authorAnthony Geay <anthony.geay@edf.fr>
Mon, 28 Mar 2022 06:08:42 +0000 (08:08 +0200)
committerAnthony Geay <anthony.geay@edf.fr>
Mon, 28 Mar 2022 06:08:42 +0000 (08:08 +0200)
src/PVServerService/ENGINE/PVSERVER_utils.py
src/PVServerService/ServiceLoader/PVServer_ServiceLoader.cxx
src/PVServerService/ServiceLoader/PVServer_ServiceLoader.h

index a414db75aa108a4ecaceb447baf5b4e11c00208e..fd078177b222e0f518a0acb0de0d9fd1b553348f 100644 (file)
@@ -62,16 +62,14 @@ def getService():
     if KernelBasis.getSSLMode():
         if __service__ is None:
             salome.salome_init()
-            __service__ = salome.lcc.FindOrLoadComponent(containerName, "PVSERVER")
-    else:
-        if __serviceLoader__ is None:
-            __serviceLoader__ = PVServer_ServiceLoader()
-        if __service__ is None:
-            import PVSERVER
-            ior = __serviceLoader__.findOrLoadService(containerName)
-            obj = getORB().string_to_object( ior )
-            __service__ = obj._narrow(PVSERVER.PVSERVER)
-            pass
+    if __serviceLoader__ is None:
+        __serviceLoader__ = PVServer_ServiceLoader()
+    if __service__ is None:
+        import PVSERVER
+        ior = __serviceLoader__.findOrLoadService(containerName)
+        obj = getORB().string_to_object( ior )
+        __service__ = obj._narrow(PVSERVER.PVSERVER)
+        pass
     return __service__
 
 ###
index b050c27da75299ca4a5ce0edc341b8f700f1e015..c2c0cf324bfa34e96ae450c68cf9adbd4c83cf5b 100644 (file)
 #include <SALOME_NamingService.hxx>
 #include <utilities.h> // MESSAGE() macro
 #include <SALOMEconfig.h>
+#include "KernelBasis.hxx"
+
 #include CORBA_CLIENT_HEADER(SALOME_ContainerManager)
 
 PVServer_ServiceLoader::PVServer_ServiceLoader():
-  myLcc( 0 )
+  myLcc( nullptr )
 {
   try
   {
-      myLcc = new SALOME_LifeCycleCORBA();
+      SALOME_NamingService_Abstract *ns(nullptr);
+      if( getSSLMode() )
+      {
+        mySSLNS.reset( new SALOME_Fake_NamingService );
+        ns = mySSLNS.get();
+      }
+      myLcc = new SALOME_LifeCycleCORBA(ns);
   }
   catch(...)
   {
index 32647eb31b7b7930f6cea340d3a623cc5a500af0..675bad502a76eb549d492babee5185cd147a23f2 100644 (file)
 #define PVSERVERSERVICELOADER_H_
 
 #include "PVServerServiceLoader.h"
+#include "SALOME_Fake_NamingService.hxx"
 #include <SALOMEconfig.h>
 #include CORBA_CLIENT_HEADER(SALOME_Component)
 #include <string>
 #include <exception>
+#include <memory>
 
 class SALOME_LifeCycleCORBA;
 
@@ -56,6 +58,7 @@ private:
 
 private:
   SALOME_LifeCycleCORBA* myLcc;
+  std::unique_ptr<SALOME_Fake_NamingService> mySSLNS;
 };
 
 #endif /* PVSERVERSERVICELOADER_H_ */