From b79d4eef01f5fd2a24bb8dd28792810aa718cdee Mon Sep 17 00:00:00 2001 From: Ed Tanous Date: Thu, 26 Jul 2018 13:24:22 -0700 Subject: 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 --- include/openbmc_dbus_rest.hpp | 7 ------- 1 file changed, 7 deletions(-) (limited to 'include') 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(); - if (propertyBool != nullptr) { - propertyJson = *propertyBool ? 1 : 0; - } } } } -- cgit v1.2.3