summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHwankyu Jhun <h.jhun@samsung.com>2018-05-04 13:43:33 +0900
committerHwankyu Jhun <h.jhun@samsung.com>2018-05-04 13:48:02 +0900
commit8f8f6a2c64b860cf33a20f07c2ff3e7ae86edcb2 (patch)
tree47a3469c61b2bbfaf3e3df0b7655026c33f1d660
parent047f60ade1953a5b529941e39b57c62a020610d3 (diff)
downloadrpc-port-Refs/for/tizen.tar.gz
rpc-port-Refs/for/tizen.tar.bz2
rpc-port-Refs/for/tizen.zip
Fix Fdbroker Watch methodRefs/for/tizen
While calling rejected callback, the developer retriesto connect to stub. This patch removes unnecessary exception handlings about watching gdbus name of stub. Change-Id: If8f8d8a6fcf9e604ec219e2cb5212a4886949fc7 Signed-off-by: Hwankyu Jhun <h.jhun@samsung.com>
-rw-r--r--src/fdbroker-internal.cc10
1 files changed, 7 insertions, 3 deletions
diff --git a/src/fdbroker-internal.cc b/src/fdbroker-internal.cc
index f8de05b..191143b 100644
--- a/src/fdbroker-internal.cc
+++ b/src/fdbroker-internal.cc
@@ -549,9 +549,6 @@ int FdBroker::Watch(IEventWatcher* ev, const std::string& target_appid,
const std::string& port_name) {
int r;
- if (watcher_ != nullptr)
- return -1;
-
if (ev == nullptr)
return -1;
@@ -577,6 +574,13 @@ int FdBroker::Watch(IEventWatcher* ev, const std::string& target_appid,
}
std::string interface_name = GetInterfaceName(target_appid, port_name);
+
+ if (watcher_id_ > 0) {
+ g_bus_unwatch_name(watcher_id_);
+ LOGD("Retry to watch name. stub %s:%s",
+ target_appid.c_str(), port_name.c_str());
+ }
+
watcher_id_ = g_bus_watch_name_on_connection(
DBusConnectionManager::GetInst().GetConnection(),
interface_name.c_str(),