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

Commit 3c1be014 authored by Łukasz Rymanowski's avatar Łukasz Rymanowski
Browse files

Revert^2 "gatt: Improve send queued request from tGATT_TCB"

dd9e6591

Change-Id: Id5711aae12b1f9c5922c28fc7c58f26c6aa68266
parent 29d29485
Loading
Loading
Loading
Loading
+4 −3
Original line number Diff line number Diff line
@@ -1132,9 +1132,10 @@ 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 (!tcb.cl_cmd_q.empty() ||
  while (
      gatt_is_outstanding_msg_in_att_send_queue(tcb) ||
      EattExtension::GetInstance()->IsOutstandingMsgInSendQueue(tcb.peer_bda)) {
    if (!tcb.cl_cmd_q.empty()) {
    if (gatt_is_outstanding_msg_in_att_send_queue(tcb)) {
      cl_cmd_q = &tcb.cl_cmd_q;
    } else {
      EattChannel* channel =
+1 −0
Original line number Diff line number Diff line
@@ -646,6 +646,7 @@ 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);
+12 −0
Original line number Diff line number Diff line
@@ -1525,6 +1525,18 @@ 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