control: Manager::addServices() fix
In Manager::addServices(), when adding a new path into the service tree,
add all services on that path with the requested interface as opposed to
just the first.
Change-Id: If10930a271e94ecadc434bff25f284917884769f
diff --git a/control/json/manager.cpp b/control/json/manager.cpp
index 20f13e9..b837dad 100644
--- a/control/json/manager.cpp
+++ b/control/json/manager.cpp
@@ -413,8 +413,10 @@
{
// Path not found in cache
auto intfs = {intf};
- _servTree[itPath.first] = {
- {itPath.second.begin()->first, std::make_pair(true, intfs)}};
+ for (const auto& [servName, servIntfs] : itPath.second)
+ {
+ _servTree[itPath.first][servName] = std::make_pair(true, intfs);
+ }
}
}
}