settings: handle multiple objects/interfaces
Handle the fact that a settings object can now implement multiple
interfaces, and also the fact that multiple settings objects
can implement the same interface.
Change-Id: Icf55b08fe2d355a10f7007489dfddb128e05d90e
Signed-off-by: Deepak Kodihalli <dkodihal@in.ibm.com>
diff --git a/ipmid.cpp b/ipmid.cpp
index 6e24bce..f6ab2fd 100644
--- a/ipmid.cpp
+++ b/ipmid.cpp
@@ -308,7 +308,7 @@
using namespace internal::cache;
sdbusplus::bus::bus dbus(ipmid_get_sd_bus_connection());
const auto& restrictionModeSetting =
- objects->map.at(restrictionModeIntf);
+ objects->map.at(restrictionModeIntf).front();
auto method = dbus.new_method_call(
objects->service(restrictionModeSetting,
restrictionModeIntf).c_str(),
@@ -596,7 +596,8 @@
sdbusplus::bus::match_t restrictedModeMatch(
dbus,
sdbusRule::propertiesChanged(
- objects->map.at(restrictionModeIntf), restrictionModeIntf),
+ objects->map.at(restrictionModeIntf).front(),
+ restrictionModeIntf),
handle_restricted_mode_change);
for (;;) {