From 4064a3e98d5e973f8865cc7e2fb7bf7204b69c95 Mon Sep 17 00:00:00 2001 From: Luiz Augusto von Dentz Date: Tue, 1 Dec 2015 13:22:08 +0200 Subject: core/device: Fix not emitting GattServices gatt_cache_used shall be set only when db was populated after the first connection and shall not be affected by storage. --- src/device.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/device.c b/src/device.c index 902191410..1f7c89565 100644 --- a/src/device.c +++ b/src/device.c @@ -4726,12 +4726,12 @@ bool device_attach_att(struct btd_device *dev, GIOChannel *io) dst = device_get_address(dev); ba2str(dst, dstaddr); - if (gatt_db_isempty(dev->db)) - load_gatt_db(dev, srcaddr, dstaddr); - gatt_client_init(dev); gatt_server_init(dev, btd_gatt_database_get_db(database)); + if (gatt_db_isempty(dev->db)) + load_gatt_db(dev, srcaddr, dstaddr); + /* * Remove the device from the connect_list and give the passive * scanning another chance to be restarted in case there are -- cgit v1.2.1