diff options
-rw-r--r-- | settings.cpp | 19 |
1 files changed, 12 insertions, 7 deletions
diff --git a/settings.cpp b/settings.cpp index e0600dc..70bf04e 100644 --- a/settings.cpp +++ b/settings.cpp @@ -43,15 +43,20 @@ Objects::Objects(sdbusplus::bus::bus& bus) : bus(bus) for (const auto& iter : result) { const Path& path = iter.first; - const Interface& interface = iter.second.begin()->second[0]; - if (autoRebootIntf == interface) + for (const auto& serviceIter : iter.second) { - autoReboot = path; - } - else if (powerRestoreIntf == interface) - { - powerRestorePolicy = path; + for (const auto& interface : serviceIter.second) + { + if (autoRebootIntf == interface) + { + autoReboot = path; + } + else if (powerRestoreIntf == interface) + { + powerRestorePolicy = path; + } + } } } } |