summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/device.c19
1 files changed, 19 insertions, 0 deletions
diff --git a/src/device.c b/src/device.c
index f032f751..4b9b3d2e 100644
--- a/src/device.c
+++ b/src/device.c
@@ -5866,8 +5866,27 @@ void device_remove_profile(gpointer a, gpointer b)
GSList *l;
l = find_service_with_profile(device->services, profile);
+#ifdef TIZEN_BT_HID_DEVICE_ENABLE
+ if (l == NULL) {
+ if (g_strcmp0(profile->local_uuid , HID_DEVICE_UUID) == 0) {
+ l = find_service_with_uuid(device->services,
+ HID_DEVICE_UUID);
+ service = l->data;
+
+ if (btd_service_get_state(service) ==
+ BTD_SERVICE_STATE_CONNECTED) {
+ int err;
+ err = btd_service_disconnect(service);
+ if (err)
+ error("error: %s", strerror(-err));
+ }
+ }
+ return;
+ }
+#else
if (l == NULL)
return;
+#endif
service = l->data;
device->services = g_slist_delete_link(device->services, l);