Remove service name checking
The action to call other actions based on a timer should not include
checking services that do not have an owner.
Change-Id: Ia4a49a7fb3559ec92f9b2d139f5999dbd05c3ead
Signed-off-by: Matthew Barth <msbarth@us.ibm.com>
diff --git a/control/actions.cpp b/control/actions.cpp
index 029a69a..5bd9e3a 100644
--- a/control/actions.cpp
+++ b/control/actions.cpp
@@ -20,26 +20,17 @@
{
try
{
- // Find any services that do not have an owner
- auto services = zone.getGroupServices(&group);
- auto setTimer = std::any_of(
- services.begin(),
- services.end(),
- [](const auto& s)
- {
- return !std::get<hasOwnerPos>(s);
- });
auto it = zone.getTimerEvents().find(__func__);
if (it != zone.getTimerEvents().end())
{
auto& timers = it->second;
auto timerIter = zone.findTimer(group, actions, timers);
- if (setTimer && timerIter == timers.end())
+ if (timerIter == timers.end())
{
// No timer exists yet for action, add timer
zone.addTimer(__func__, group, actions, tConf);
}
- else if (!setTimer && timerIter != timers.end())
+ else if (timerIter != timers.end())
{
// Remove any timer for this group
timers.erase(timerIter);
@@ -49,7 +40,7 @@
}
}
}
- else if (setTimer)
+ else
{
// No timer exists yet for event, add timer
zone.addTimer(__func__, group, actions, tConf);