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

Commit 0182faac authored by Archie Pusaka's avatar Archie Pusaka
Browse files

Always check for no GATT transaction before sending request

After completing a GATT request in cl_op_cmpl(), we invoke a callback
and send the next request. However, the callback mentioned can
potentially send another request via accept_client_operation(). Since
we shouldn't send two simultaneous request in GATT, this might end up
being problematic, such as mismatching the response.

This CL makes sure there are no parallel running request before
sending the next request.

Bug: 279881847
Test: Manual pairing/poweroff/poweron/forget loop with MX Master 2S
      mouse. Verify the device name never gets overwritten with
      wrong values.
Change-Id: I08cca1dd588f748d253d6007ad50ac10d62668d4
parent 82763f0b
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -246,7 +246,7 @@ void server_attr_request_cback(uint16_t conn_id, uint32_t trans_id,
 * Returns true if read started, else false if GAP is busy.
 */
bool send_cl_read_request(tGAP_CLCB& clcb) {
  if (!clcb.requests.size()) {
  if (!clcb.requests.size() || clcb.cl_op_uuid != 0) {
    return false;
  }