Add debugging logs 22/236222/2
authorHwankyu Jhun <h.jhun@samsung.com>
Mon, 15 Jun 2020 22:58:36 +0000 (07:58 +0900)
committerHwankyu Jhun <h.jhun@samsung.com>
Mon, 15 Jun 2020 23:47:21 +0000 (08:47 +0900)
Change-Id: I8e52a130112ef96cb474635f7bdf27a5f6b2e4f4
Signed-off-by: Hwankyu Jhun <h.jhun@samsung.com>
src/rpc-port.cc

index cba0110..257123e 100644 (file)
 #include <thread>
 #include <mutex>
 
-#include "rpc-port.h"
+#include "log-private.hh"
 #include "port-internal.h"
 #include "proxy-internal.h"
+#include "rpc-port.h"
 #include "stub-internal.h"
 
 #undef RPC_API
@@ -219,8 +220,8 @@ RPC_API int rpc_port_proxy_create(rpc_port_proxy_h* h) {
   if (h == nullptr)
     return RPC_PORT_ERROR_INVALID_PARAMETER;
 
+  _W("rpc_port_proxy_create(%p)", h);
   auto p = new ::ProxyExt();
-
   *h = p;
   return RPC_PORT_ERROR_NONE;
 }
@@ -238,8 +239,8 @@ RPC_API int rpc_port_proxy_destroy(rpc_port_proxy_h h) {
   if (h == nullptr)
     return RPC_PORT_ERROR_INVALID_PARAMETER;
 
+  _W("rpc_port_proxy_destroy(%p)", h);
   auto p = static_cast<::ProxyExt*>(h);
-
   delete p;
   return RPC_PORT_ERROR_NONE;
 }
@@ -249,6 +250,7 @@ RPC_API int rpc_port_proxy_connect(rpc_port_proxy_h h, const char* appid,
   if (h == nullptr || appid == nullptr || port == nullptr)
     return RPC_PORT_ERROR_INVALID_PARAMETER;
 
+  _W("rpc_port_proxy_connect(%p, %s, %s)", h, appid, port);
   auto p = static_cast<::ProxyExt*>(h);
   std::lock_guard<std::recursive_mutex> lock(p->GetMutex());
 
@@ -261,6 +263,7 @@ RPC_API int rpc_port_proxy_connect_sync(rpc_port_proxy_h h, const char* appid,
   if (h == nullptr || appid == nullptr || port == nullptr)
     return RPC_PORT_ERROR_INVALID_PARAMETER;
 
+  _W("rpc_port_proxy_connect(%p, %s, %s)", h, appid, port);
   auto p = static_cast<::ProxyExt*>(h);
   std::lock_guard<std::recursive_mutex> lock(p->GetMutex());
 
@@ -347,8 +350,8 @@ RPC_API int rpc_port_stub_create(rpc_port_stub_h* h, const char* port_name) {
   if (h == nullptr || port_name == nullptr)
     return RPC_PORT_ERROR_INVALID_PARAMETER;
 
+  _W("rpc_port_stub_create(%p, %s)", h, port_name);
   auto p = new ::StubExt(port_name);
-
   *h = p;
   return RPC_PORT_ERROR_NONE;
 }
@@ -370,8 +373,8 @@ RPC_API int rpc_port_stub_destroy(rpc_port_stub_h h) {
   if (h == nullptr)
     return RPC_PORT_ERROR_INVALID_PARAMETER;
 
+  _W("rpc_port_stub_destroy(%p)", h);
   auto p = static_cast<::StubExt*>(h);
-
   delete p;
   return RPC_PORT_ERROR_NONE;
 }
@@ -380,6 +383,7 @@ RPC_API int rpc_port_stub_listen(rpc_port_stub_h h) {
   if (h == nullptr)
     return RPC_PORT_ERROR_INVALID_PARAMETER;
 
+  _W("rpc_port_stub_listen(%p)", h);
   auto p = static_cast<::StubExt*>(h);
   std::lock_guard<std::recursive_mutex> lock(p->GetMutex());