summaryrefslogtreecommitdiffstats
path: root/fault-monitor
diff options
context:
space:
mode:
authorMatt Spinler <spinler@us.ibm.com>2017-11-06 12:32:35 -0600
committerMatt Spinler <spinler@us.ibm.com>2017-12-05 11:19:05 -0600
commit9f78224616a00da873f1ced6f14d77fc83d7fa32 (patch)
treedb3dda940a0716306c1e079a7161b6710782555a /fault-monitor
parent8f38744d79fcbf34b22a9ecef65fe31f75fa857e (diff)
downloadphosphor-led-manager-9f78224616a00da873f1ced6f14d77fc83d7fa32.tar.gz
phosphor-led-manager-9f78224616a00da873f1ced6f14d77fc83d7fa32.zip
Use interfaces-removed for association removes
The mapper will no longer emit properties-changed signals when the last endpoints property is removed from the fault association object. It will only emit an interfaces-removed signal in that case, so change the code to subscribe to the interfaces-removed signal instead. Change-Id: I225376e550d21b82473015324cd9a261e16fe6db Signed-off-by: Matt Spinler <spinler@us.ibm.com>
Diffstat (limited to 'fault-monitor')
-rw-r--r--fault-monitor/fru-fault-monitor.cpp24
-rw-r--r--fault-monitor/fru-fault-monitor.hpp7
2 files changed, 3 insertions, 28 deletions
diff --git a/fault-monitor/fru-fault-monitor.cpp b/fault-monitor/fru-fault-monitor.cpp
index 1988d1b..cb6c4e4 100644
--- a/fault-monitor/fru-fault-monitor.cpp
+++ b/fault-monitor/fru-fault-monitor.cpp
@@ -253,30 +253,6 @@ void Add::processExistingCallouts(sdbusplus::bus::bus& bus)
void Remove::removed(sdbusplus::message::message& msg)
{
auto bus = msg.get_bus();
- std::string assoc;
- msg.read(assoc);
-
- if (assoc.compare("org.openbmc.Association"))
- {
- //Skip if not about association
- return;
- }
-
- std::map<std::string, std::vector<std::string>> endPoints;
- msg.read(endPoints);
- auto it = endPoints.find("endpoints");
-
- if (it == endPoints.end())
- {
- //No end points,skip
- return;
- }
-
- if (!((*it).second.empty()))
- {
- //Skip, end points are not empty
- return;
- }
action(bus, inventoryPath, false);
return;
diff --git a/fault-monitor/fru-fault-monitor.hpp b/fault-monitor/fru-fault-monitor.hpp
index 897ef05..77d3be2 100644
--- a/fault-monitor/fru-fault-monitor.hpp
+++ b/fault-monitor/fru-fault-monitor.hpp
@@ -124,10 +124,9 @@ class Remove
namespace MatchRules = sdbusplus::bus::match::rules;
std::string matchStmt =
- MatchRules::type::signal() +
- MatchRules::interface("org.freedesktop.DBus.Properties") +
- MatchRules::member("PropertiesChanged") +
- MatchRules::path(path + "/" + CALLOUT_REV_ASSOCIATION);
+ MatchRules::interfacesRemoved() +
+ MatchRules::argNpath(
+ 0, path + "/" + CALLOUT_REV_ASSOCIATION);
return matchStmt;
}
OpenPOWER on IntegriCloud