diff options
| author | Ed Tanous <ed.tanous@intel.com> | 2018-07-26 13:24:22 -0700 |
|---|---|---|
| committer | James Feist <james.feist@linux.intel.com> | 2018-08-20 21:35:51 +0000 |
| commit | b79d4eef01f5fd2a24bb8dd28792810aa718cdee (patch) | |
| tree | 4de6624198523ce4c397eb2cd31768ef821ba1db /include | |
| parent | eb1eb78e639414bf0862e4c2fee5ab65c1d2f314 (diff) | |
| download | bmcweb-b79d4eef01f5fd2a24bb8dd28792810aa718cdee.tar.gz bmcweb-b79d4eef01f5fd2a24bb8dd28792810aa718cdee.zip | |
Make dbus-rest produce bool type instead of int
To replicate the dbus-rest interfaces exactly, bmcweb explicitly
converted bool values on dbus into their int equivalent (0 or 1) to
faithfully replicate the "bug" in dbus-rest. With the review posted
here
https://gerrit.openbmc-project.xyz/#/c/openbmc/phosphor-rest-server/+/11267/
there is discussion around correcting this behavior in dbus-rest. This
patchset is to maintain compatibility with the dbus rest interfaces,
and to implement a TODO that's existed in bmcweb for a while.
Change-Id: I4b832d7f1b46e09c35c587511af0ecaeb2df12fd
Signed-off-by: Ed Tanous <ed.tanous@intel.com>
Diffstat (limited to 'include')
| -rw-r--r-- | include/openbmc_dbus_rest.hpp | 7 |
1 files changed, 0 insertions, 7 deletions
diff --git a/include/openbmc_dbus_rest.hpp b/include/openbmc_dbus_rest.hpp index 8ab1b6a..3e6443d 100644 --- a/include/openbmc_dbus_rest.hpp +++ b/include/openbmc_dbus_rest.hpp @@ -100,13 +100,6 @@ void getManagedObjectsForEnumerate( mapbox::util::apply_visitor( [&propertyJson](auto &&val) { propertyJson = val; }, property.second); - - // dbus-rest represents booleans as 1 or 0, implement to match - // TODO(ed) see if dbus-rest should be changed - const bool *propertyBool = propertyJson.get_ptr<const bool *>(); - if (propertyBool != nullptr) { - propertyJson = *propertyBool ? 1 : 0; - } } } } |

