diff options
author | Luiz Augusto von Dentz <luiz.von.dentz@intel.com> | 2015-12-01 13:22:08 +0200 |
---|---|---|
committer | Luiz Augusto von Dentz <luiz.von.dentz@intel.com> | 2015-12-01 13:22:08 +0200 |
commit | 4064a3e98d5e973f8865cc7e2fb7bf7204b69c95 (patch) | |
tree | 73fa14f9c211434d0c55515e8eb404aa891a1e9d | |
parent | 95049a1816d9d963988f3209b299edc53bd5dc44 (diff) | |
download | bluez-4064a3e98d5e973f8865cc7e2fb7bf7204b69c95.tar.gz |
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.
-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 |