From: Anthony Geay Date: Wed, 18 Aug 2021 14:50:13 +0000 (+0200) Subject: WIP X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=19920c0ffabc6066263a2675fb79a75820a05e41;p=modules%2Fkernel.git WIP --- diff --git a/src/NamingService/SALOME_Fake_NamingService.cxx b/src/NamingService/SALOME_Fake_NamingService.cxx index ce5360833..a667cc03e 100644 --- a/src/NamingService/SALOME_Fake_NamingService.cxx +++ b/src/NamingService/SALOME_Fake_NamingService.cxx @@ -60,6 +60,11 @@ void SALOME_Fake_NamingService::Register(CORBA::Object_ptr ObjRef, const char* P void SALOME_Fake_NamingService::Destroy_Name(const char* Path) { + std::lock_guard g(_mutex); + std::string pathCpp(Path); + auto it = _map.find(pathCpp); + if(it!=_map.end()) + _map.erase(it); } void SALOME_Fake_NamingService::Destroy_Directory(const char* Path) @@ -72,6 +77,7 @@ void SALOME_Fake_NamingService::Destroy_FullDirectory(const char* Path) bool SALOME_Fake_NamingService::Change_Directory(const char* Path) { + std::lock_guard g(_mutex); _current_dir = Path; return true; } @@ -105,6 +111,7 @@ std::vector SALOME_Fake_NamingService::list_subdirs() std::vector SALOME_Fake_NamingService::list_directory() { + std::lock_guard g(_mutex); std::vector ret; std::vector splitCWD(SplitDir(_current_dir)); auto len = _current_dir.length();