diff --git a/dump_utils.cpp b/dump_utils.cpp index 5feb6c8..2a46054 100644 --- a/dump_utils.cpp +++ b/dump_utils.cpp @@ -64,15 +64,15 @@ void createPEL( // Implies this is a call from Manager. Hence we need to make an async // call to avoid deadlock with Phosphor-logging. auto retVal = - busMethod.call_async([&](sdbusplus::message::message&& reply) { + busMethod.call_async([&](const sdbusplus::message::message& reply) { if (reply.is_method_error()) { - log("Error in calling async method to create PEL"); + lg2::error("Error in calling async method to create PEL"); } }); if (!retVal) { - log("Return object contains null pointer"); + lg2::error("Return object contains null pointer"); } } catch (const sdbusplus::exception::SdBusError& e) diff --git a/dump_utils.hpp b/dump_utils.hpp index ec7fd42..eb1d673 100644 --- a/dump_utils.hpp +++ b/dump_utils.hpp @@ -423,29 +423,24 @@ inline uint64_t timeToEpoch(std::string timeStr) * @return Returns void */ void createPEL( - sdbusplus::bus::bus& dBus, const std::string& pelSev, - const std::string& errIntf, - const std::unordered_map& userDataMap); + sdbusplus::bus::bus& dBus, std::string& pelSev, std::string& errIntf, + std::unordered_map& userDataMap); /** - * @brief Create a new PEL message for dump Delete/Offload + * @brief Create a new PEL message for dump Delete * * @param[in] dBus - Handle to D-Bus object * @param[in] pelSev - PEL severity (Informational by default) * @param[in] errIntf - D-Bus interface name. - * @param[in] dumpFilePath - Deleted/Offloaded dump file path/name - * @param[in] dumpFileType - Deleted/Offloaded dump file type - * (BMC/Resource/System) + * @param[in] dumpFilePath - Deleted dump file path/name + * @param[in] dumpFileType - Deleted dump file type (BMC/Resource/System) * @param[in] dumpId - The dump ID * @return Returns void * * Note: Passing by value as this has an async call */ -void createPELOnDumpActions(sdbusplus::bus::bus& dBus, - const std::string dumpFilePath, - const std::string dumpFileType, - const std::string dumpId, const std::string pelSev, - const std::string errIntf); +void createPELOnDumpActions(sdbusplus::bus::bus& dBus, std::string dumpFilePath, + std::string dumpFileType, std::string dumpId, + std::string pelSev, std::string errIntf); #endif - } // namespace dump } // namespace phosphor