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

Commit dd9e6591 authored by Jack He's avatar Jack He
Browse files

Revert "gatt: Improve send queued request from tGATT_TCB"

Revert submission 2268950

Bug: 257046947
Bug: 249431973
Test: reverting changes that broke earlier build
Reason for revert: b/257046947 infinite loop
Reverted Changes:
If19de77a8:gatt: Improve queueing of GATT messages
I1bfb4c546:gatt: Remove reduntant `in_use` flag
I1d3351ebc:gatt: Improve send queued request from tGATT_TCB

Change-Id: I2c925d07981aca37a36986e4214d70167b9e1cf6
parent 75cc3cb7
Loading
Loading
Loading
Loading
+3 −4
Original line number Diff line number Diff line
@@ -1132,10 +1132,9 @@ uint8_t gatt_cmd_to_rsp_code(uint8_t cmd_code) {
bool gatt_cl_send_next_cmd_inq(tGATT_TCB& tcb) {
  std::deque<tGATT_CMD_Q>* cl_cmd_q = nullptr;

  while (
      gatt_is_outstanding_msg_in_att_send_queue(tcb) ||
  while (!tcb.cl_cmd_q.empty() ||
         EattExtension::GetInstance()->IsOutstandingMsgInSendQueue(tcb.peer_bda)) {
    if (gatt_is_outstanding_msg_in_att_send_queue(tcb)) {
    if (!tcb.cl_cmd_q.empty()) {
      cl_cmd_q = &tcb.cl_cmd_q;
    } else {
      EattChannel* channel =
+0 −1
Original line number Diff line number Diff line
@@ -646,7 +646,6 @@ extern void gatt_client_handle_server_rsp(tGATT_TCB& tcb, uint16_t cid,
                                          uint8_t* p_data);
extern void gatt_send_queue_write_cancel(tGATT_TCB& tcb, tGATT_CLCB* p_clcb,
                                         tGATT_EXEC_FLAG flag);
extern bool gatt_is_outstanding_msg_in_att_send_queue(const tGATT_TCB& tcb);

/* gatt_auth.cc */
extern bool gatt_security_check_start(tGATT_CLCB* p_clcb);
+0 −12
Original line number Diff line number Diff line
@@ -1525,18 +1525,6 @@ tGATT_STATUS gatt_send_write_msg(tGATT_TCB& tcb, tGATT_CLCB* p_clcb,
  return attp_send_cl_msg(tcb, p_clcb, op_code, &msg);
}

/*******************************************************************************
 *
 * Function         gatt_is_outstanding_msg_in_att_send_queue
 *
 * Description      checks if there is message on the ATT fixed channel to send
 *
 * Returns          true: on success; false otherwise
 *
 ******************************************************************************/
bool gatt_is_outstanding_msg_in_att_send_queue(const tGATT_TCB& tcb) {
  return (!tcb.cl_cmd_q.empty() && (tcb.cl_cmd_q.front()).to_send);
}
/*******************************************************************************
 *
 * Function         gatt_end_operation