maybe that fixes the issues
This commit is contained in:
@ -143,6 +143,7 @@ void SusAssembly::refreshHelperModes() {
|
||||
ReturnValue_t SusAssembly::checkAndHandleHealthStates(Mode_t deviceMode, Submode_t deviceSubmode) {
|
||||
using namespace returnvalue;
|
||||
ReturnValue_t status = returnvalue::OK;
|
||||
bool needsHealthOverwritten = false;
|
||||
auto checkSusGroup = [&](object_id_t devNom, object_id_t devRed) {
|
||||
HealthState healthNom = healthHelper.healthTable->getHealth(devNom);
|
||||
HealthState healthRed = healthHelper.healthTable->getHealth(devRed);
|
||||
@ -150,6 +151,7 @@ ReturnValue_t SusAssembly::checkAndHandleHealthStates(Mode_t deviceMode, Submode
|
||||
(healthRed == FAULTY or healthRed == PERMANENT_FAULTY)) {
|
||||
overwriteDeviceHealth(devNom, healthNom);
|
||||
overwriteDeviceHealth(devRed, healthRed);
|
||||
needsHealthOverwritten = true;
|
||||
}
|
||||
};
|
||||
auto checkHealthForOneDev = [&](object_id_t dev) {
|
||||
@ -168,5 +170,8 @@ ReturnValue_t SusAssembly::checkAndHandleHealthStates(Mode_t deviceMode, Submode
|
||||
checkHealthForOneDev(helper.susIds[idx]);
|
||||
}
|
||||
}
|
||||
if(needsHealthOverwritten) {
|
||||
return NEED_TO_CHANGE_HEALTH;
|
||||
}
|
||||
return status;
|
||||
}
|
||||
|
Reference in New Issue
Block a user