diff options
-rw-r--r-- | include/google/google_service_root.hpp | 14 |
1 files changed, 5 insertions, 9 deletions
diff --git a/include/google/google_service_root.hpp b/include/google/google_service_root.hpp index 2d431469d5..2100fabba2 100644 --- a/include/google/google_service_root.hpp +++ b/include/google/google_service_root.hpp @@ -67,22 +67,18 @@ inline void hothGetSubtreeCallback( redfish::messages::internalError(asyncResp->res); return; } - // Iterate over all retrieved ObjectPaths. - for (const std::pair< - std::string, - std::vector<std::pair<std::string, std::vector<std::string>>>>& - object : subtree) + for (const auto& [path, services] : subtree) { - sdbusplus::message::object_path objPath(object.first); - if (objPath.filename() != rotId || object.second.empty()) + sdbusplus::message::object_path objPath(path); + if (objPath.filename() != rotId || services.empty()) { continue; } ResolvedEntity resolvedEntity = { .id = rotId, - .service = object.second[0].first, - .object = object.first, + .service = services[0].first, + .object = path, .interface = "xyz.openbmc_project.Control.Hoth"}; entityHandler(command, asyncResp, resolvedEntity); return; |