]> SALOME platform Git repositories - modules/kernel.git/commitdiff
Salome HOME
Correction of a bug :
authorageay <ageay>
Thu, 26 May 2005 10:37:06 +0000 (10:37 +0000)
committerageay <ageay>
Thu, 26 May 2005 10:37:06 +0000 (10:37 +0000)
When a component does not exist in a machine, list of machine was not updated correctly.

src/ResourcesManager/SALOME_ResourcesManager.cxx

index da3c8997719c5ed064796246f516d69831eba151..2a67ffc7b10fd5ffc88560a612f68489126831e6 100644 (file)
@@ -319,14 +319,14 @@ void SALOME_ResourcesManager::SelectOnlyResourcesWithOS(vector<string>& hosts,co
 //Warning need an updated parsed list : _resourcesList
 void SALOME_ResourcesManager::KeepOnlyResourcesWithModule(vector<string>& hosts,const char *moduleName) const throw(SALOME_Exception)
 {
-   for(vector<string>::iterator iter=hosts.begin();iter!=hosts.end();iter++)
+   for(vector<string>::iterator iter=hosts.begin();iter!=hosts.end();)
      {
        MapOfParserResourcesType::const_iterator it=_resourcesList.find(*iter);
        const map<string,string>& mapOfModulesOfCurrentHost=(((*it).second).ModulesPath);
        if(mapOfModulesOfCurrentHost.find(moduleName)==mapOfModulesOfCurrentHost.end())
-        {
-          hosts.erase(iter);
-        }
+        hosts.erase(iter);
+       else
+        iter++;
      }
 }