From ecea399d168988e6af703b2932131fa2e4a49b65 Mon Sep 17 00:00:00 2001 From: "injun.yang" Date: Thu, 14 May 2020 11:28:40 +0900 Subject: [PATCH] Fix : Handle service changed indication properly [Model] All [BinType] AP [Customer] OPEN [Issue#] P200504-04947 [Request] Internal [Occurrence Version] N/A [Problem] GATT service browsing failed. [Cause & Measure] Ignore service indication during browsing. Some characteristics what is not included form the primary service is found. So unable to insert characteristic to GATT DB. Handle the indication before starting svc browsing. [Checking Method] n/a [Team] Convergence BT [Developer] Injun Yang [Solution company] Samsung [Change Type] Specification change Change-Id: I809beeb51a7d88dfc0cc15b062ab8f7e372b7ccc Signed-off-by: Wootak Jung --- src/shared/gatt-client.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/shared/gatt-client.c b/src/shared/gatt-client.c index 2a9b825..53ac836 100644 --- a/src/shared/gatt-client.c +++ b/src/shared/gatt-client.c @@ -2258,9 +2258,10 @@ static void notify_cb(uint8_t opcode, const void *pdu, uint16_t length, /* GATT caching is not supported yet. Once it supported, need to handle svc changed indication */ - if (opcode == BT_ATT_OP_HANDLE_VAL_IND && !client->parent) { + if (opcode == BT_ATT_OP_HANDLE_VAL_IND && !client->parent + && !client->discovery_req) { util_debug(client->debug_callback, client->debug_data, - "Client is not ready. No need handling svc changed indication before full scan"); + "Service browsing is not started. No need handling svc changed indication before starting full scan"); bt_att_send(client->att, BT_ATT_OP_HANDLE_VAL_CONF, NULL, 0, NULL, NULL, NULL); return; -- 2.7.4