From: mpa Date: Fri, 13 Jan 2017 12:50:54 +0000 (+0300) Subject: fix problem with SALOMEDS_Server bug X-Git-Tag: Before_python3_27062017~1^2~11 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=3e51714a5b023fdfccfb7002d26cdfbeafe607cf;p=modules%2Fkernel.git fix problem with SALOMEDS_Server bug --- diff --git a/src/SALOMEDS/SALOMEDS.cxx b/src/SALOMEDS/SALOMEDS.cxx index 695992deb..23e4f3a20 100644 --- a/src/SALOMEDS/SALOMEDS.cxx +++ b/src/SALOMEDS/SALOMEDS.cxx @@ -118,8 +118,10 @@ extern "C" namingService.Register(aStudy, "/Study"); // Assign the value of the IOR in the study->root - CORBA::String_var IORStudy = orb->object_to_string(aStudy); - aStudy_i->GetImpl()->SetTransientReference((char*)IORStudy.in()); + if ( aStudy_i->GetImpl()->GetTransientReference().empty() ) { + CORBA::String_var IORStudy = orb->object_to_string(aStudy); + aStudy_i->GetImpl()->SetTransientReference((char*)IORStudy.in()); + } aStudy_i->_remove_ref(); } } diff --git a/src/SALOMEDS/SALOMEDS_Server.cxx b/src/SALOMEDS/SALOMEDS_Server.cxx index 21db9a8c0..addbbba1a 100644 --- a/src/SALOMEDS/SALOMEDS_Server.cxx +++ b/src/SALOMEDS/SALOMEDS_Server.cxx @@ -166,11 +166,13 @@ int main(int argc, char** argv) NS = SINGLETON_::Instance(); NS->init_orb( orb ); } - NS->Register(Study.in(), "/Study"); + NS->Register(Study, "/Study"); // Assign the value of the IOR in the study->root - CORBA::String_var IORStudy = orb->object_to_string(Study); - myStudy_i->GetImpl()->SetTransientReference((char*)IORStudy.in()); + if ( myStudy_i->GetImpl()->GetTransientReference().empty() ) { + CORBA::String_var IORStudy = orb->object_to_string(Study); + myStudy_i->GetImpl()->SetTransientReference((char*)IORStudy.in()); + } myStudy_i->_remove_ref(); diff --git a/src/SALOMEDSImpl/SALOMEDSImpl_Study.cxx b/src/SALOMEDSImpl/SALOMEDSImpl_Study.cxx index 6e1e77792..42bc8839b 100644 --- a/src/SALOMEDSImpl/SALOMEDSImpl_Study.cxx +++ b/src/SALOMEDSImpl/SALOMEDSImpl_Study.cxx @@ -522,7 +522,7 @@ bool SALOMEDSImpl_Study::Impl_SaveAs(const std::string& aStudyUrl, std::string component_name; // Store previous URL - std::string anOldName = Name(); + std::string anOldName = URL(); // Map to store components' versions std::map componentVersions;