From dc8d0a393b5d558800fdca49a52cf57450e42535 Mon Sep 17 00:00:00 2001 From: Anthony Geay Date: Wed, 13 Jan 2021 17:17:31 +0100 Subject: [PATCH] WIP --- src/SALOMEDS/SALOMEDS_Driver_i.cxx | 5 +++-- src/SALOMEDS/SALOMEDS_Driver_i.hxx | 4 ++-- src/SALOMEDS/SALOMEDS_Study_i.cxx | 2 +- 3 files changed, 6 insertions(+), 5 deletions(-) diff --git a/src/SALOMEDS/SALOMEDS_Driver_i.cxx b/src/SALOMEDS/SALOMEDS_Driver_i.cxx index 04a85cb94..c82cc604e 100644 --- a/src/SALOMEDS/SALOMEDS_Driver_i.cxx +++ b/src/SALOMEDS/SALOMEDS_Driver_i.cxx @@ -348,10 +348,11 @@ SALOMEDSImpl_TMPFile* SALOMEDS_Driver_i::DumpPython(bool isPublished, // SALOMEDS_DriverFactory //############################################################################################################### -SALOMEDS_DriverFactory_i::SALOMEDS_DriverFactory_i(CORBA::ORB_ptr theORB) +SALOMEDS_DriverFactory_i::SALOMEDS_DriverFactory_i(CORBA::ORB_ptr theORB, bool isNSAvail) { _orb = CORBA::ORB::_duplicate(theORB); - _name_service = new SALOME_NamingService(_orb); + if(isNSAvail) + _name_service = new SALOME_NamingService(_orb); } diff --git a/src/SALOMEDS/SALOMEDS_Driver_i.hxx b/src/SALOMEDS/SALOMEDS_Driver_i.hxx index 28dc9e3dc..3ec27fd16 100644 --- a/src/SALOMEDS/SALOMEDS_Driver_i.hxx +++ b/src/SALOMEDS/SALOMEDS_Driver_i.hxx @@ -111,11 +111,11 @@ class SALOMEDS_DriverFactory_i : public virtual SALOMEDSImpl_DriverFactory { protected: CORBA::ORB_var _orb; - SALOME_NamingService* _name_service; + SALOME_NamingService* _name_service = nullptr; public: - SALOMEDS_DriverFactory_i(CORBA::ORB_ptr theORB); + SALOMEDS_DriverFactory_i(CORBA::ORB_ptr theORB, bool isNSAvail = true); virtual ~SALOMEDS_DriverFactory_i(); diff --git a/src/SALOMEDS/SALOMEDS_Study_i.cxx b/src/SALOMEDS/SALOMEDS_Study_i.cxx index 2cc448448..31a2bef46 100644 --- a/src/SALOMEDS/SALOMEDS_Study_i.cxx +++ b/src/SALOMEDS/SALOMEDS_Study_i.cxx @@ -297,7 +297,7 @@ SALOMEDS_Study_i::SALOMEDS_Study_i(CORBA::ORB_ptr orb, SALOME::Session_ptr sessi { _orb = CORBA::ORB::_duplicate(orb); _impl = new SALOMEDSImpl_Study(); - _factory = new SALOMEDS_DriverFactory_i(_orb); + _factory = new SALOMEDS_DriverFactory_i(_orb,!CORBA::is_nil(session)); _closed = true; Init(session); -- 2.39.2