PerformScan: Drop dbusSubtree parameter from updateSystemConfiguration()
PerformProbe was reaching into the PerformScan instance to pass
updateSystemConfiguration() PerformScan's own dbusProbeObjects. We can
just use the implicit `this` to access it inside
updateSystemConfiguration().
Signed-off-by: Andrew Jeffery <andrew@aj.id.au>
Change-Id: I27124c01358e227c78c7054070ba1fc8384ac4ac
diff --git a/src/PerformScan.cpp b/src/PerformScan.cpp
index c81557f..144b824 100644
--- a/src/PerformScan.cpp
+++ b/src/PerformScan.cpp
@@ -464,9 +464,9 @@
return copyIt.value();
}
-void PerformScan::updateSystemConfiguration(
- const nlohmann::json& recordRef, const std::string& probeName,
- FoundDevices& foundDevices, const MapperGetSubTreeResponse& dbusSubtree)
+void PerformScan::updateSystemConfiguration(const nlohmann::json& recordRef,
+ const std::string& probeName,
+ FoundDevices& foundDevices)
{
_passed = true;
passedProbes.push_back(probeName);
@@ -515,9 +515,10 @@
// interface, such as if it was just TRUE, then
// templateCharReplace will just get passed in an empty
// map.
- auto objectIt = dbusSubtree.find(path);
- const DBusObject& dbusObject =
- (objectIt == dbusSubtree.end()) ? emptyObject : objectIt->second;
+ auto objectIt = dbusProbeObjects.find(path);
+ const DBusObject& dbusObject = (objectIt == dbusProbeObjects.end())
+ ? emptyObject
+ : objectIt->second;
nlohmann::json record = recordRef;
std::string recordName = getRecordName(foundDevice, probeName);