From 3eb66652034052aebd1029f778d6c1e08f1d18fc Mon Sep 17 00:00:00 2001 From: Asmitha Karunanithi Date: Tue, 2 Apr 2024 16:34:36 +0000 Subject: log_services: Move to setProperty dbus util method This commit changes sdbusplus setProperty calls in log_services.hpp file to "setDbusProperty" method in Redfish namespace that handles all DBus errors in a consistent manner. Change-Id: Icd9b0f0326c75a1421756d515408b303bdd738e3 Signed-off-by: Asmitha Karunanithi --- redfish-core/lib/log_services.hpp | 16 ++++------------ 1 file changed, 4 insertions(+), 12 deletions(-) (limited to 'redfish-core') diff --git a/redfish-core/lib/log_services.hpp b/redfish-core/lib/log_services.hpp index 4ea01e3531..d2b834a26e 100644 --- a/redfish-core/lib/log_services.hpp +++ b/redfish-core/lib/log_services.hpp @@ -2075,18 +2075,10 @@ inline void requestRoutesDBusEventLogEntry(App& app) } BMCWEB_LOG_DEBUG("Set Resolved"); - sdbusplus::asio::setProperty( - *crow::connections::systemBus, "xyz.openbmc_project.Logging", - "/xyz/openbmc_project/logging/entry/" + entryId, - "xyz.openbmc_project.Logging.Entry", "Resolved", *resolved, - [asyncResp, entryId](const boost::system::error_code& ec) { - if (ec) - { - BMCWEB_LOG_DEBUG("DBUS response error {}", ec); - messages::internalError(asyncResp->res); - return; - } - }); + setDbusProperty(asyncResp, "xyz.openbmc_project.Logging", + "/xyz/openbmc_project/logging/entry/" + entryId, + "xyz.openbmc_project.Logging.Entry", "Resolved", + "Resolved", *resolved); }); BMCWEB_ROUTE( -- cgit v1.2.3