summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEd Tanous <ed.tanous@intel.com>2018-10-30 10:11:07 -0700
committerEd Tanous <ed.tanous@intel.com>2018-10-30 10:25:17 -0700
commit5935b1e35100efee31b184f0687305ccba9f8c13 (patch)
treed0b180e68c899f762332cee2761dd737f1ed70a8
parent0570c6940cd193e7106b584984de8fd5f1643bfa (diff)
downloadphosphor-objmgr-5935b1e35100efee31b184f0687305ccba9f8c13.tar.gz
phosphor-objmgr-5935b1e35100efee31b184f0687305ccba9f8c13.zip
mapper: Fix GetSubTree bug in the c++ mapper
In cases where multiple daemons expose the same interface, there was a bug where, if an interface filter was applied, only the first found daemon would be returned. This resulted in sub-optimal behavior when searching for things like ObjectManager, that might exist in a lot of daemons. Tested By: Before Patch: root@wolfpass:/# dbus-send --system --print-reply --dest=xyz.openbmc_project.ObjectMapper /xyz/openbmc_project/object_mapper xyz.openbmc_project.ObjectMapper.GetSubTree string:"/" int32:1 array:string:org.freedesktop.DBus.ObjectManager Returns 1 entry After Patch: root@wolfpass:/# dbus-send --system --print-reply --dest=xyz.openbmc_project.ObjectMapper /xyz/openbmc_project/object_mapper xyz.openbmc_project.ObjectMapper.GetSubTree string:"/" int32:1 array:string:org.freedesktop.DBus.ObjectManager returns 12 entries Change-Id: I0b4e982649f03b0bacf35e26e4d7f310e644d6b8 Signed-off-by: Ed Tanous <ed.tanous@intel.com>
-rw-r--r--src/main.cpp6
1 files changed, 0 insertions, 6 deletions
diff --git a/src/main.cpp b/src/main.cpp
index ef93cc3..2643eed 100644
--- a/src/main.cpp
+++ b/src/main.cpp
@@ -947,12 +947,6 @@ int main(int argc, char** argv)
interfaces.empty())
{
addSubtreeResult(ret, this_path, interface_map);
-
- // if not just adding every interface, then done
- if (!interfaces.empty())
- {
- break;
- }
}
}
}
OpenPOWER on IntegriCloud