summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPatrick Venture <venture@google.com>2018-05-09 10:29:42 -0700
committerPatrick Venture <venture@google.com>2018-05-10 09:18:09 -0700
commit0d73b108d235cd403f98fbbf72346fdce0bf8fd8 (patch)
tree17fa7ea7ad4ab93ee8e4a4f2a3f76371dadf2330
parent1df1a2c84dcc217425b69cea2dd60ce6871f15ec (diff)
downloadphosphor-pid-control-0d73b108d235cd403f98fbbf72346fdce0bf8fd8.tar.gz
phosphor-pid-control-0d73b108d235cd403f98fbbf72346fdce0bf8fd8.zip
dbus: util: Remove explicit element count
The dbus interface can have new properties added, and it's improbable to have the three we care about removed. Therefore, let's remove the explicit count check on the number of properties returned. Change-Id: Ia292c73dc889a33a4b1f334585bbce910f20a580 Signed-off-by: Patrick Venture <venture@google.com>
-rw-r--r--dbus/util.cpp6
1 files changed, 1 insertions, 5 deletions
diff --git a/dbus/util.cpp b/dbus/util.cpp
index 692e9c5..7e1f9a5 100644
--- a/dbus/util.cpp
+++ b/dbus/util.cpp
@@ -68,11 +68,7 @@ void GetProperties(sdbusplus::bus::bus& bus,
PropertyMap propMap;
valueResponseMsg.read(propMap);
- if (propMap.size() != 3)
- {
- throw std::runtime_error("ERROR in results, expected three properties");
- }
-
+ // If no error was set, the values should all be there.
prop->unit = sdbusplus::message::variant_ns::get<std::string>(propMap["Unit"]);
prop->scale = sdbusplus::message::variant_ns::get<int64_t>(propMap["Scale"]);
prop->value = sdbusplus::message::variant_ns::get<int64_t>(propMap["Value"]);
OpenPOWER on IntegriCloud