diff options
author | Asmitha Karunanithi <asmitk01@in.ibm.com> | 2024-04-02 19:34:36 +0300 |
---|---|---|
committer | Asmitha Karunanithi <asmitk01@in.ibm.com> | 2024-04-03 15:08:17 +0300 |
commit | 3eb66652034052aebd1029f778d6c1e08f1d18fc (patch) | |
tree | ba8dfabb1e6e03e4ac1dfc8195ffee89561be145 /redfish-core | |
parent | 5575efb61318a29b810b841390dce5b80cbeacfb (diff) | |
download | bmcweb-3eb66652034052aebd1029f778d6c1e08f1d18fc.tar.xz |
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 <asmitk01@in.ibm.com>
Diffstat (limited to 'redfish-core')
-rw-r--r-- | redfish-core/lib/log_services.hpp | 16 |
1 files changed, 4 insertions, 12 deletions
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( |