Commit: 6b34bdd967a639c2d219b5d83f0a20637c56e68e
Parent: bec7657000c5a6d1d4fcb1dd235f02782bb882b5
Author: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
Committer: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
Date: 2017-05-29 16:02:21
Tree: 6af5a693bedc31ad797f9f8a2b1c326ed63da232

shared/gatt-client: Fix not removing services that had disappeared If a service cannot be found in the middle of the database the current logic don't clear its range leaving it still active which cause upper layer to believe its attributes are still available. In order to fix the code now loads existing services into the pending list and remove the services left at the end of the discovery: src/device.c:gatt_debug() Primary services found: 2 src/device.c:gatt_debug() start: 0x0001, end: 0x0005, uuid: 00001800-0000-1000-8000-00805f9b34fb src/device.c:gatt_debug() start: 0x0100, end: 0x0104, uuid: 0000180a-0000-1000-8000-00805f9b34fb src/device.c:gatt_debug() Secondary service discovery failed. ATT ECODE: 0x0a src/device.c:gatt_debug() Characteristics found: 2 src/device.c:gatt_debug() start: 0x0101, end: 0x0102, value: 0x0102, props: 0x02, uuid: 00002a24-0000-1 src/device.c:gatt_debug() start: 0x0103, end: 0x0104, value: 0x0104, props: 0x02, uuid: 00002a29-0000-1 src/device.c:gatt_debug() service disappeared: start 0x0006 end 0x000a src/device.c:gatt_service_removed() start: 0x0006, end: 0x000a

Diffstat

M src/shared/gatt-client.c | 64 ++++++++++++++++++++++++++++++++++++++++-

1 files changed, 63 insertions(+), 1 deletions(-)

View Full Diff | Patch