Fixed port registration 41/191141/1
authorHwankyu Jhun <h.jhun@samsung.com>
Thu, 11 Oct 2018 23:55:20 +0000 (08:55 +0900)
committerHwankyu Jhun <h.jhun@samsung.com>
Thu, 11 Oct 2018 23:56:53 +0000 (08:56 +0900)
Getting owner ID is called after registering interface.
When stub is getting owner ID, name appeared callback function of proxy
is invoked.

Change-Id: Ic53aef2b873b774ee510f3322d2af63ab5b706f6
Signed-off-by: Hwankyu Jhun <h.jhun@samsung.com>
src/fdbroker-internal.cc

index 2c183a3..aa234c7 100644 (file)
@@ -462,12 +462,6 @@ int FdBroker::RegisterDbusInterface(const std::string& port_name) {
     return -1;
 
   std::string interface_name = GetInterfaceName(appid, port_name);
-
-  if (GetOwnerId(interface_name) < 0) {
-    LOGE("Failed to get owner id");
-    return -1;
-  }
-
   std::string introspection_xml = introspection_prefix +
                                   interface_name +
                                   introspection_postfix;
@@ -490,6 +484,13 @@ int FdBroker::RegisterDbusInterface(const std::string& port_name) {
     return -1;
   }
 
+  if (GetOwnerId(interface_name) < 0) {
+    LOGE("Failed to get owner id");
+    return -1;
+  }
+
+  LOGI("%s is registered", port_name);
+
   return 0;
 }