control: Handle `Current` property changing
It appears there's no longer a need to handle objects owned by fan
control that it may also be subscribed to for propertiesChanged signals.
This may be due to updates in sdbusplus's async capabilities, but in
case these signals begin to get dropped to the fan control service, an
issue was created to re-test the handling of the `Current` thermal mode
property changing (https://github.com/ibm-openbmc/dev/issues/3195)
This commit adds a `TODO` note along with some minor changes to updating
the value of the `Current` property.
Change-Id: Id26d80566318327982ac8c72406803e55059d9b8
Signed-off-by: Matthew Barth <msbarth@us.ibm.com>
diff --git a/control/json/triggers/signal.cpp b/control/json/triggers/signal.cpp
index cd05756..9e793f0 100644
--- a/control/json/triggers/signal.cpp
+++ b/control/json/triggers/signal.cpp
@@ -44,7 +44,6 @@
void subscribe(const std::string& match, SignalPkg&& signalPkg,
std::function<bool(SignalPkg&)> isSameSig, Manager* mgr)
{
- // TODO - Handle signal subscriptions to objects hosted by fan control
auto& signalData = mgr->getSignal(match);
if (signalData.empty())
{
@@ -53,6 +52,8 @@
std::unique_ptr<std::vector<SignalPkg>> dataPkgs =
std::make_unique<std::vector<SignalPkg>>(std::move(pkgs));
std::unique_ptr<sdbusplus::server::match::match> ptrMatch = nullptr;
+ // TODO(ibm-openbmc/#3195) - Filter signal subscriptions to objects
+ // owned by fan control?
if (!match.empty())
{
// Subscribe to signal
diff --git a/control/json/zone.cpp b/control/json/zone.cpp
index 08aa91a..bf11cba 100644
--- a/control/json/zone.cpp
+++ b/control/json/zone.cpp
@@ -227,19 +227,10 @@
if (value != current && isSupported)
{
current = ThermalObject::current(value);
- if (isPersisted("xyz.openbmc_project.Control.ThermalMode", "Current"))
+ if (isPersisted(thermModeIntf, currentProp))
{
saveCurrentMode();
}
- // TODO Trigger event(s) for current mode property change
- // auto eData =
- // _objects[_path]["xyz.openbmc_project.Control.ThermalMode"]
- // ["Current"];
- // if (eData != nullptr)
- // {
- // sdbusplus::message::message nullMsg{nullptr};
- // handleEvent(nullMsg, eData);
- // }
}
return current;