From 62cce3db547d09a0fb330c0168f331e339c5025c Mon Sep 17 00:00:00 2001 From: Hwankyu Jhun Date: Fri, 12 Oct 2018 08:55:20 +0900 Subject: [PATCH] Fixed port registration 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 --- src/fdbroker-internal.cc | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/src/fdbroker-internal.cc b/src/fdbroker-internal.cc index 2c183a3..aa234c7 100644 --- a/src/fdbroker-internal.cc +++ b/src/fdbroker-internal.cc @@ -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; } -- 2.7.4