shared/gatt-client: Fix discovering included svcs using invalid range 26/163226/1
authorSeungyoun Ju <sy39.ju@samsung.com>
Thu, 7 Dec 2017 08:18:38 +0000 (17:18 +0900)
committerDoHyun Pyun <dh79.pyun@samsung.com>
Fri, 8 Dec 2017 05:22:07 +0000 (14:22 +0900)
commit4e50c429c446d353a9fecbd2e5a995671c723eaa
treeee775a0bc3331eed4d134d7f03fa775177962a2f
parent4fadd6d2eeb7a9e23b4ec3e21b4163a81259064b
shared/gatt-client: Fix discovering included svcs using invalid range

[Problem] It discovers included services using invalid handle range 0 ~ 0.
 It causes ATT error response and GATT connection is failed.
[Cause & Measure] When any service is removed over the previous connection,
 pending_svcs queue is not empty because it is used to identify
 disappeared services. So we need to check more if there are any services
 to be discovered or not.
 This patch checks the service range and if there is no service
 to be discovered, stop the discovery.
[Checking Method] Connect to iOS -> Turn off and on iOS's Bluetooth

Change-Id: I312cba9a53c55ce266d98196e3ba81b236d885e9
Signed-off-by: Seungyoun Ju <sy39.ju@samsung.com>
Signed-off-by: DoHyun Pyun <dh79.pyun@samsung.com>
src/shared/gatt-client.c