Commit: a07eb3a5e96d7f23a2aa554088d3cc3a9e57744f
Parent: c8e7911e804b3db30f1745a4085ad8526578b27c
Author: Andrzej Kaczmarek <andrzej.kaczmarek@codecoup.pl>
Committer: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
Date: 2018-03-23 13:19:05
Tree: 5e415cfc96beddc1f915c8203e260dc06b255012

shared/gatt-client: Fix discovery of discontinuous database If local cache of peer's database has gaps where new services appear after reconnection, GATT client will attempt to discover all included services and characteristics definitions between starting handle of first service and end handle of last service. This means the result will contain also attributes which are already present in active services in local database and thus attempting to add them again will fail. To fix this, instead of discovering whole range we'll only discover ranges for missing services - starting with included services then characteristics. To optimize this process we'll merge ranges of adjacent services and any empty spaces in between - the result is basically set of ranges without any known service. In most cases this works the same or very similar to current implementation. This issue can sometimes be observed with iOS devices as ANCS and CTS services may not be available all the time.

Diffstat

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

1 files changed, 106 insertions(+), 10 deletions(-)

View Full Diff | Patch