Make dbusconfiguration reloadable without reboot
Now that asio is being used instead of threads, we can
reload the fan configuration without having to restart the
application. This moves the ownership of the passive and host
bus outside of the SensorManager so that it can be recreated
each reload.
Tested: Watched logs and saw full fan config get reloaded
after changing fan configuration
Tested: Ran on json configured system and it behaved as
expected.
Change-Id: I00e6b27f75384fd41de2017b723f159c9691ae97
Signed-off-by: James Feist <james.feist@linux.intel.com>
diff --git a/test/sensor_manager_unittest.cpp b/test/sensor_manager_unittest.cpp
index 8a89628..9f0e26c 100644
--- a/test/sensor_manager_unittest.cpp
+++ b/test/sensor_manager_unittest.cpp
@@ -24,7 +24,7 @@
IsNull(), _, StrEq("/xyz/openbmc_project/extsensors")))
.WillOnce(Return(0));
- SensorManager s(std::move(bus_mock_passive), std::move(bus_mock_host));
+ SensorManager s(bus_mock_passive, bus_mock_host);
// Success
}
@@ -43,7 +43,7 @@
IsNull(), _, StrEq("/xyz/openbmc_project/extsensors")))
.WillOnce(Return(0));
- SensorManager s(std::move(bus_mock_passive), std::move(bus_mock_host));
+ SensorManager s(bus_mock_passive, bus_mock_host);
std::string name = "name";
std::string type = "invalid";