From 14569a33418a4c1dc07cca090b9336373d63a085 Mon Sep 17 00:00:00 2001 From: Luiz Augusto von Dentz Date: Wed, 11 Mar 2015 21:23:55 +0200 Subject: [PATCH] core/device: Fix not handling notification attio callbacks needs to be triggered as soon as possible once connected otherwise profiles such as HoG may miss notification that are sent while bt_gatt_client is doing MTU exchange. --- src/device.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/device.c b/src/device.c index 831efeaf9..0dc8c8638 100644 --- a/src/device.c +++ b/src/device.c @@ -3984,8 +3984,6 @@ static void gatt_client_ready_cb(bool success, uint8_t att_ecode, device_accept_gatt_profiles(device); - g_slist_foreach(device->attios, attio_connected, device->attrib); - btd_gatt_client_ready(device->client_dbus); } @@ -4007,6 +4005,9 @@ static void gatt_client_init(struct btd_device *device) return; } + /* Notify attio so it can react to notifications */ + g_slist_foreach(device->attios, attio_connected, device->attrib); + if (!bt_gatt_client_set_ready_handler(device->client, gatt_client_ready_cb, device, NULL)) { -- 2.47.3