dbus-sdr: change to continue when path not found
- If the virtual sensor has two association paths as below, and the real
inventory path is related to entity-manager according to the HW
config. So we need to continue for loop when the first inventory path
not found.
```
{
"type" : "a(sss)",
"data" : [
[
"chassis",
"all_sensors",
"/xyz/openbmc_project/inventory/system/board/BMC"
],
[
"chassis",
"all_sensors",
"/xyz/openbmc_project/inventory/system/board/BMCV2"
]
]
}
```
Signed-off-by: Harvey Wu <Harvey.Wu@quantatw.com>
Change-Id: I3c4ebe953793c7f28a112bb85a6cb89bd41adc3a
diff --git a/dbus-sdr/sdrutils.cpp b/dbus-sdr/sdrutils.cpp
index 399b59a..a5a82e9 100644
--- a/dbus-sdr/sdrutils.cpp
+++ b/dbus-sdr/sdrutils.cpp
@@ -535,12 +535,12 @@
const std::string* configurationInterface =
getSensorConfigurationInterface(sensorInterfacesResponse);
- // We didnt' find a configuration interface for this sensor, but we
- // followed the Association property to get here, so we're done
- // searching.
+ // If there are multi association path settings and only one path exist,
+ // we need to continue if cannot find configuration interface for this
+ // sensor.
if (!configurationInterface)
{
- break;
+ continue;
}
// We found a configuration interface.