diff options
-rw-r--r-- | src/device.c | 6 |
1 files 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 |