summaryrefslogtreecommitdiff
path: root/redfish-core
diff options
context:
space:
mode:
authorEd Tanous <ed@tanous.net>2024-03-08 02:47:37 +0300
committerEd Tanous <ed@tanous.net>2024-03-08 03:44:33 +0300
commite715d14b258a764f0e41559fe4a5e9f7d2efe314 (patch)
tree57c49353681da3f862cfb8a765db3f17d4b751dd /redfish-core
parentce73d5c8517e0b85d85de345f10c82c24cbb067b (diff)
downloadbmcweb-e715d14b258a764f0e41559fe4a5e9f7d2efe314.tar.xz
Fix behavior when service is missing
Fix regression as part of 33e1f122b740c5de679dc0350b5f41e8d975499f AllowedHostTransitions: look for on dbus I have no idea why checking against .value() matters here, but on systems that doesn't have this daemon present, checking against ec == instead of ec.value() == causes this to return 500. Loaded on qemu, without an implementation of AllowedValues. ``` curl -vvvv -k --user "root:0penBmc" -H "Content-Type: application/json" https://192.168.7.2/redfish/v1/Systems/system/ResetActionInfo ``` Now succeeds. Change-Id: I05758c3f9fd9d0f1c90830ba005c74bc6f874bd6 Signed-off-by: Ed Tanous <ed@tanous.net>
Diffstat (limited to 'redfish-core')
-rw-r--r--redfish-core/lib/systems.hpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/redfish-core/lib/systems.hpp b/redfish-core/lib/systems.hpp
index 37599e7d96..a8751b00a6 100644
--- a/redfish-core/lib/systems.hpp
+++ b/redfish-core/lib/systems.hpp
@@ -3643,8 +3643,9 @@ inline void afterGetAllowedHostTransitions(
if (ec)
{
- if (ec == boost::system::linux_error::bad_request_descriptor ||
- ec == boost::asio::error::basic_errors::host_unreachable)
+ if ((ec.value() ==
+ boost::system::linux_error::bad_request_descriptor) ||
+ (ec.value() == boost::asio::error::basic_errors::host_unreachable))
{
// Property not implemented so just return defaults
BMCWEB_LOG_DEBUG("Property not available {}", ec);