From 952efea7bdf85fda26f23ee9bbe6ecae03a223d1 Mon Sep 17 00:00:00 2001 From: "Mikhail I. Krivtsov" Date: Sat, 14 May 2016 11:37:30 +0300 Subject: [PATCH] shared/gatt-client: Fix sending confirmation Confirmation shall be sent from topmost parent only. Extra confirmation sent by clone confuses remote side. > ACL Data RX: Handle 69 flags 0x02 dlen 27 ATT: Handle Value Indication (0x1d) len 22 Handle: 0x001f Data: 68656c6c6f2027302e302e302e303a3532353332 < ACL Data TX: Handle 69 flags 0x00 dlen 5 ATT: Handle Value Confirmation (0x1e) len 0 < ACL Data TX: Handle 69 flags 0x00 dlen 5 ATT: Handle Value Confirmation (0x1e) len 0 --- src/shared/gatt-client.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/shared/gatt-client.c b/src/shared/gatt-client.c index 84689f62f..adabfe351 100644 --- a/src/shared/gatt-client.c +++ b/src/shared/gatt-client.c @@ -1745,7 +1745,7 @@ static void notify_cb(uint8_t opcode, const void *pdu, uint16_t length, queue_foreach(client->notify_list, notify_handler, &pdu_data); - if (opcode == BT_ATT_OP_HANDLE_VAL_IND) + if (opcode == BT_ATT_OP_HANDLE_VAL_IND && !client->parent) bt_att_send(client->att, BT_ATT_OP_HANDLE_VAL_CONF, NULL, 0, NULL, NULL, NULL); -- 2.47.3