PLDM: 5 sec timeout for dbus calls without reply
This commit adds 5 second dbus timeout value to dbus calls with no reply. Previously a commit was merged that included 5 seconds dbus timeout value for all dbus call with reply.
This is added to make sure PLDM does not wait for more than 5 seconds when a dbus call is made with or without reply if no response is received from other daemon or host.
The 5 second timeout value is overridden to 10 seconds in meta-ibm layer
Change-Id: Ic20005d903732ac58bb22a657bf1b0c07439d435
Signed-off-by: vkaverap@in.ibm.com <vkaverap@in.ibm.com>
diff --git a/common/utils.hpp b/common/utils.hpp
index d78d172..654b0b4 100644
--- a/common/utils.hpp
+++ b/common/utils.hpp
@@ -28,6 +28,11 @@
using microsec = std::chrono::microseconds;
using sec = std::chrono::seconds;
+constexpr uint64_t dbusTimeout =
+ std::chrono::duration_cast<std::chrono::microseconds>(
+ std::chrono::seconds(DBUS_TIMEOUT))
+ .count();
+
namespace pldm
{
namespace utils