projects
/
platform
/
core
/
connectivity
/
bluetooth-frwk.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Handle the pending dbus calls before termination
[platform/core/connectivity/bluetooth-frwk.git]
/
bt-service-adaptation
/
services
/
bt-request-handler.c
diff --git
a/bt-service-adaptation/services/bt-request-handler.c
b/bt-service-adaptation/services/bt-request-handler.c
index
d1d1203
..
752f5de
100644
(file)
--- a/
bt-service-adaptation/services/bt-request-handler.c
+++ b/
bt-service-adaptation/services/bt-request-handler.c
@@
-4269,6
+4269,19
@@
gboolean _is_name_acquired(void)
return name_acquired;
}
return name_acquired;
}
+void _bt_service_unref_connection(void)
+{
+ BT_INFO("+");
+
+ if (bt_service_conn) {
+ g_dbus_connection_flush_sync(bt_service_conn, NULL, NULL);
+ g_object_unref(bt_service_conn);
+ bt_service_conn = NULL;
+ }
+
+ BT_INFO("-");
+}
+
int _bt_service_register(void)
{
GDBusConnection *conn;
int _bt_service_register(void)
{
GDBusConnection *conn;
@@
-4318,15
+4331,12
@@
void _bt_service_unregister(void)
owner_sig_id = 0;
}
owner_sig_id = 0;
}
- __bt_service_register_object(bt_service_conn, NULL, FALSE);
- if (bt_service_conn) {
- g_object_unref(bt_service_conn);
- bt_service_conn = NULL;
- }
if (owner_id > 0) {
g_bus_unown_name(owner_id);
owner_id = 0;
}
if (owner_id > 0) {
g_bus_unown_name(owner_id);
owner_id = 0;
}
+
+ __bt_service_register_object(bt_service_conn, NULL, FALSE);
}
}
}
}