Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit b08b153f authored by Jakub Pawlowski's avatar Jakub Pawlowski Committed by Automerger Merge Worker
Browse files

Fix ATT_FIND_INFORMATION_RSP containing only one entry am: eed7fa68

parents 0aa8e5a4 eed7fa68
Loading
Loading
Loading
Loading
+3 −2
Original line number Diff line number Diff line
@@ -638,6 +638,7 @@ static tGATT_STATUS gatt_build_find_info_rsp(tGATT_SRV_LIST_ELEM& el, BT_HDR* p_

  uint8_t* p = (uint8_t*)(p_msg + 1) + L2CAP_MIN_OFFSET + p_msg->len;

  tGATT_STATUS status = GATT_NOT_FOUND;
  for (auto& attr : el.p_db->attr_list) {
    if (attr.handle > e_hdl) {
      break;
@@ -673,10 +674,10 @@ static tGATT_STATUS gatt_build_find_info_rsp(tGATT_SRV_LIST_ELEM& el, BT_HDR* p_
    }
    p_msg->len += info_pair_len[p_msg->offset - 1];
    len -= info_pair_len[p_msg->offset - 1];
    return GATT_SUCCESS;
    status = GATT_SUCCESS;
  }

  return GATT_NOT_FOUND;
  return status;
}

static tGATT_STATUS read_handles(uint16_t& len, uint8_t*& p, uint16_t& s_hdl, uint16_t& e_hdl) {