From: prascle Date: Wed, 29 Apr 2009 14:22:19 +0000 (+0000) Subject: PR: default policy X-Git-Tag: CCAR_cm3_start~2 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=03ae171290a27139b40b671da4c1ba52b508aa82;p=modules%2Fkernel.git PR: default policy --- diff --git a/src/ResourcesManager/ResourcesManager.cxx b/src/ResourcesManager/ResourcesManager.cxx index 6bdfdce25..e09908f76 100644 --- a/src/ResourcesManager/ResourcesManager.cxx +++ b/src/ResourcesManager/ResourcesManager.cxx @@ -58,6 +58,7 @@ ResourcesManager_cpp(const char *xmlFilePath) : _resourceManagerMap["cycl"]=&cycl; _resourceManagerMap["altcycl"]=&altcycl; _resourceManagerMap["best"]=&altcycl; + _resourceManagerMap[""]=&altcycl; } //============================================================================= @@ -80,6 +81,7 @@ ResourcesManager_cpp::ResourcesManager_cpp() throw(ResourcesException) _resourceManagerMap["cycl"]=&cycl; _resourceManagerMap["altcycl"]=&altcycl; _resourceManagerMap["best"]=&altcycl; + _resourceManagerMap[""]=&altcycl; _isAppliSalomeDefined = (getenv("APPLI") != 0); if(!getenv("KERNEL_ROOT_DIR")) throw ResourcesException("you must define KERNEL_ROOT_DIR environment variable!!"); @@ -386,7 +388,8 @@ const MapOfParserResourcesType& ResourcesManager_cpp::GetList() const string ResourcesManager_cpp::Find(const std::string& policy, const std::vector& listOfMachines) { - if(_resourceManagerMap.count(policy)==0)return ""; + if(_resourceManagerMap.count(policy)==0) + return _resourceManagerMap[""]->Find(listOfMachines,_resourcesList); return _resourceManagerMap[policy]->Find(listOfMachines,_resourcesList); }