summaryrefslogtreecommitdiffstats
path: root/control/actions.cpp
diff options
context:
space:
mode:
authorMatthew Barth <msbarth@us.ibm.com>2017-11-06 11:00:00 -0600
committerMatthew Barth <msbarth@us.ibm.com>2017-11-17 13:14:11 -0600
commit480787c118fb511a8fe23a19f97bcf24b564c11e (patch)
treee3800e1e72c6e206d42f78f872376d2937531bcf /control/actions.cpp
parent2b3db618a00a1360d7a61cf0e712e1c50764297f (diff)
downloadphosphor-fan-presence-480787c118fb511a8fe23a19f97bcf24b564c11e.tar.gz
phosphor-fan-presence-480787c118fb511a8fe23a19f97bcf24b564c11e.zip
Refresh service states for a group
Prior to an action resulting from missing service owners, all of the services for a group should be refreshed to ensure they are in the most up-to-date state. Ensuring the service states are current allows the action to be correctly taken since owners of services could change at anytime. Change-Id: I59c59c6fcf456fa9c0a733d6406c90ea11f6e2b2 Signed-off-by: Matthew Barth <msbarth@us.ibm.com>
Diffstat (limited to 'control/actions.cpp')
-rw-r--r--control/actions.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/control/actions.cpp b/control/actions.cpp
index 66bba2b..8ecd30c 100644
--- a/control/actions.cpp
+++ b/control/actions.cpp
@@ -83,6 +83,8 @@ Action call_actions_based_on_timer(Timer&& tConf, std::vector<Action>&& actions)
void default_floor_on_missing_owner(Zone& zone, const Group& group)
{
+ // Set/update the services of the group
+ zone.setServices(&group);
auto services = zone.getGroupServices(&group);
auto defFloor = std::any_of(
services.begin(),
@@ -103,6 +105,8 @@ Action set_speed_on_missing_owner(uint64_t speed)
{
return [speed](control::Zone& zone, const Group& group)
{
+ // Set/update the services of the group
+ zone.setServices(&group);
auto services = zone.getGroupServices(&group);
auto missingOwner = std::any_of(
services.begin(),
OpenPOWER on IntegriCloud