PerformScan: Eliminate interfaceConnections
Signed-off-by: Andrew Jeffery <andrew@aj.id.au>
Change-Id: Iea610223ee89e5d690d4500bed81216426c990c9
diff --git a/src/PerformScan.cpp b/src/PerformScan.cpp
index 6cb6ef5..83768b7 100644
--- a/src/PerformScan.cpp
+++ b/src/PerformScan.cpp
@@ -111,12 +111,11 @@
const std::shared_ptr<PerformScan>& scan,
const GetSubTreeType& interfaceSubtree)
{
- boost::container::flat_set<
- std::tuple<std::string, std::string, std::string>>
- interfaceConnections;
-
for (const auto& [path, object] : interfaceSubtree)
{
+ // Get a PropertiesChanged callback for all interfaces on this path.
+ registerCallback(scan->_systemConfiguration, scan->objServer, path);
+
for (const auto& [busname, ifaces] : object)
{
for (const std::string& iface : ifaces)
@@ -127,18 +126,10 @@
// with the GetAll call to save some cycles.
if (!boost::algorithm::starts_with(iface, "org.freedesktop"))
{
- interfaceConnections.emplace(busname, path, iface);
+ getInterfaces({busname, path, iface}, probeVector, scan);
}
}
}
-
- // Get a PropertiesChanged callback for all interfaces on this path.
- registerCallback(scan->_systemConfiguration, scan->objServer, path);
- }
-
- for (const auto& call : interfaceConnections)
- {
- getInterfaces(call, probeVector, scan);
}
}