Enable multiple actions per event
Reduce the number of dbus signal callbacks by enabling
multiple actions for a single event.
Change-Id: I944eea6ac450c2ea9a201e724765edbef4e677b4
Signed-off-by: Brad Bishop <bradleyb@fuzziesquirrel.com>
diff --git a/manager.cpp b/manager.cpp
index b7a1634..00bf833 100644
--- a/manager.cpp
+++ b/manager.cpp
@@ -145,10 +145,11 @@
void Manager::signal(sdbusplus::message::message &msg, auto &args)
{
auto &filter = *std::get<1>(args);
- auto &action = *std::get<2>(args);
+ auto &actions = std::get<2>(args);
if(filter(msg, *this)) {
- action(*this);
+ for (auto &action: actions)
+ (*action)(*this);
}
}