From: Anthony Geay Date: Mon, 28 Mar 2022 06:08:42 +0000 (+0200) Subject: [tuleap29134] : fix pvsimple import in SSL mode X-Git-Tag: V9_9_0a2^0 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=330d53f37d5af2d4e37b38dc08c30257a5ed97f4;p=modules%2Fgui.git [tuleap29134] : fix pvsimple import in SSL mode --- diff --git a/src/PVServerService/ENGINE/PVSERVER_utils.py b/src/PVServerService/ENGINE/PVSERVER_utils.py index a414db75a..fd078177b 100644 --- a/src/PVServerService/ENGINE/PVSERVER_utils.py +++ b/src/PVServerService/ENGINE/PVSERVER_utils.py @@ -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__ ### diff --git a/src/PVServerService/ServiceLoader/PVServer_ServiceLoader.cxx b/src/PVServerService/ServiceLoader/PVServer_ServiceLoader.cxx index b050c27da..c2c0cf324 100644 --- a/src/PVServerService/ServiceLoader/PVServer_ServiceLoader.cxx +++ b/src/PVServerService/ServiceLoader/PVServer_ServiceLoader.cxx @@ -24,14 +24,22 @@ #include #include // MESSAGE() macro #include +#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(...) { diff --git a/src/PVServerService/ServiceLoader/PVServer_ServiceLoader.h b/src/PVServerService/ServiceLoader/PVServer_ServiceLoader.h index 32647eb31..675bad502 100644 --- a/src/PVServerService/ServiceLoader/PVServer_ServiceLoader.h +++ b/src/PVServerService/ServiceLoader/PVServer_ServiceLoader.h @@ -22,10 +22,12 @@ #define PVSERVERSERVICELOADER_H_ #include "PVServerServiceLoader.h" +#include "SALOME_Fake_NamingService.hxx" #include #include CORBA_CLIENT_HEADER(SALOME_Component) #include #include +#include class SALOME_LifeCycleCORBA; @@ -56,6 +58,7 @@ private: private: SALOME_LifeCycleCORBA* myLcc; + std::unique_ptr mySSLNS; }; #endif /* PVSERVERSERVICELOADER_H_ */