OSDN Git Service

gatt: Fix CID check when receiving ack
authorHsingYuan Lo <hylo@google.com>
Tue, 8 Sep 2020 03:27:40 +0000 (11:27 +0800)
committerHsingYuan Lo <hylo@google.com>
Tue, 8 Sep 2020 03:27:40 +0000 (11:27 +0800)
Tag: #feature
Test: build & test service change behavior
Bug: 159786353
Change-Id: Idb9811e8dd3b0a7bcacc482501f348c477a918c5

stack/gatt/gatt_sr.cc

index 0346b40..60fe429 100644 (file)
@@ -1181,7 +1181,7 @@ static bool gatts_proc_ind_ack(tGATT_TCB& tcb, uint16_t ack_handle) {
 void gatts_process_value_conf(tGATT_TCB& tcb, uint16_t cid, uint8_t op_code) {
   uint16_t handle;
 
-  if (gatt_tcb_find_indicate_handle(tcb, cid, &handle)) {
+  if (!gatt_tcb_find_indicate_handle(tcb, cid, &handle)) {
     LOG(ERROR) << "unexpected handle value confirmation";
     return;
   }