]> SALOME platform Git repositories - modules/kernel.git/commitdiff
Salome HOME
PR: Shutdown containers correction: avoid CORBA calls to a container during its shutd...
authorprascle <prascle>
Tue, 24 Oct 2006 12:07:58 +0000 (12:07 +0000)
committerprascle <prascle>
Tue, 24 Oct 2006 12:07:58 +0000 (12:07 +0000)
src/Container/SALOME_ContainerManager.cxx

index 61aa660fc87a2d7d38fc99abff916e4beabc741a..8998aa2e32d6c8bdd33e1f335abe6dc42b5a5461 100644 (file)
@@ -111,7 +111,23 @@ void SALOME_ContainerManager::ShutdownContainers()
   MESSAGE("ShutdownContainers");
   _NS->Change_Directory("/Containers");
   vector<string> vec = _NS->list_directory_recurs();
+  list<string> lstCont;
   for(vector<string>::iterator iter = vec.begin();iter!=vec.end();iter++)
+    {
+      SCRUTE((*iter));
+      CORBA::Object_var obj=_NS->Resolve((*iter).c_str());
+      Engines::Container_var cont=Engines::Container::_narrow(obj);
+      if(!CORBA::is_nil(cont))
+       {
+         lstCont.push_back((*iter));
+       }
+    }
+  MESSAGE("Container list: ");
+  for(list<string>::iterator iter=lstCont.begin();iter!=lstCont.end();iter++)
+    {
+      SCRUTE((*iter));
+    }
+  for(list<string>::iterator iter=lstCont.begin();iter!=lstCont.end();iter++)
     {
       SCRUTE((*iter));
       CORBA::Object_var obj=_NS->Resolve((*iter).c_str());