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>
const std::string& port_name) {
int r;
- if (watcher_ != nullptr)
- return -1;
-
if (ev == nullptr)
return -1;
}
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(),