sensor: Reuse ipmid bus for inventory-notify
Partially fixes openbmc/openbmc#875.
Change-Id: Id1cf69f5e4e5413d95ebeccf73abde1de76de3e4
Signed-off-by: Patrick Williams <patrick@stwcx.xyz>
diff --git a/sensorhandler.cpp b/sensorhandler.cpp
index 38f84d4..95d8ad0 100644
--- a/sensorhandler.cpp
+++ b/sensorhandler.cpp
@@ -410,7 +410,7 @@
}
objects.emplace(iter->second.sensorPath, std::move(interfaces));
- auto bus = sdbusplus::bus::new_default();
+ sdbusplus::bus::bus bus{sd_bus_ref(ipmid_get_sd_bus_connection())};
using namespace std::string_literals;
static const auto intf = "xyz.openbmc_project.Inventory.Manager"s;
static const auto path = "/xyz/openbmc_project/inventory"s;