PLDM : Change the dbus timeout to 5 seconds

Dbus timeout value for every dbus call in PLDM is set to 5 seconds
instead of default 25 seconds so that all dbus calls that expect a
reply exists after 5 seconds if there is no response from the client.
While BMC is still waiting for a response on any dbus calls it is
possible that host can timeout and return an error.
Another reason is that memory address from where BMC would read data
sent by host may get deallocated after 20 seconds and it is possible
for this to happen even before BMC has read the data. This has lead
to DMA issues.

Tested by adding a sleep for 10 seconds inside main function of
phospher-host-postd and executed get dbus property on snoopd
interface from pldm. PLDM dbus call timed out after 5 seconds.

Change-Id: I1aa1b4ad7fceff2224a3ccc3bcf6abd5705963bc
Signed-off-by: Varsha Kaverappa <vkaverap@in.ibm.com>
diff --git a/oem/ibm/libpldmresponder/file_io_type_dump.cpp b/oem/ibm/libpldmresponder/file_io_type_dump.cpp
index 2c6b02a..9005f66 100644
--- a/oem/ibm/libpldmresponder/file_io_type_dump.cpp
+++ b/oem/ibm/libpldmresponder/file_io_type_dump.cpp
@@ -69,7 +69,9 @@
             bus.new_method_call(DUMP_MANAGER_BUSNAME, DUMP_MANAGER_PATH,
                                 OBJECT_MANAGER_INTERFACE, "GetManagedObjects");
 
-        auto reply = bus.call(method);
+        auto reply = bus.call(
+            method,
+            std::chrono::duration_cast<microsec>(sec(DBUS_TIMEOUT)).count());
         reply.read(objects);
     }
     catch (const sdbusplus::exception_t& e)
@@ -285,7 +287,9 @@
                 auto method = bus.new_method_call(
                     "xyz.openbmc_project.Dump.Manager", path.c_str(),
                     "xyz.openbmc_project.Object.Delete", "Delete");
-                bus.call(method);
+                bus.call(method,
+                         std::chrono::duration_cast<microsec>(sec(DBUS_TIMEOUT))
+                             .count());
             }
             catch (const std::exception& e)
             {