Added asynchronous callDbusMethod

This path added two callDbusMethod methods, one without method return
value (default return ec), and the other with method return value.

Change-Id: I16503fe24adc0f3896a861972751d532b6361ef9
Signed-off-by: George Liu <liuxiwei@ieisystem.com>
diff --git a/ipmid-new.cpp b/ipmid-new.cpp
index 1e85a0d..f130780 100644
--- a/ipmid-new.cpp
+++ b/ipmid-new.cpp
@@ -30,6 +30,7 @@
 #include <ipmid/message.hpp>
 #include <ipmid/oemrouter.hpp>
 #include <ipmid/types.hpp>
+#include <ipmid/utils.hpp>
 #include <phosphor-logging/lg2.hpp>
 #include <sdbusplus/asio/connection.hpp>
 #include <sdbusplus/asio/object_server.hpp>
@@ -786,15 +787,14 @@
             // Responses in IPMI require a bit set.  So there ya go...
             netFn |= 0x01;
 
-            const char *dest, *path;
             constexpr const char* DBUS_INTF = "org.openbmc.HostIpmi";
 
-            dest = m.get_sender();
-            path = m.get_path();
-            boost::system::error_code ec;
-            bus->yield_method_call(yield, ec, dest, path, DBUS_INTF,
-                                   "sendMessage", seq, netFn, lun, cmd,
-                                   response->cc, response->payload.raw);
+            std::string dest = m.get_sender();
+            std::string path = m.get_path();
+            boost::system::error_code ec = ipmi::callDbusMethod(
+                ctx, dest, path, DBUS_INTF, "sendMessage", seq, netFn, lun, cmd,
+                response->cc, response->payload.raw);
+
             if (ec)
             {
                 lg2::error(