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

Commit 6302d803 authored by Łukasz Rymanowski's avatar Łukasz Rymanowski
Browse files

gatt: Fix possible MTU Request stuck in the bta queue

Following MTU Request should not be enque for exectution but simply put
in the queue, which later is checked by the code when MTU Exchange
procedure is ended.

Bug: 311830877
Test: manual stress testing of LE HS reconnections.
Tag: Feature
Change-Id: Ic90cadbebdcc52a496f2b1eea4e9a18746e5b327
parent 6497a766
Loading
Loading
Loading
Loading
+5 −1
Original line number Diff line number Diff line
@@ -768,7 +768,11 @@ void bta_gattc_cfg_mtu(tBTA_GATTC_CLCB* p_clcb, const tBTA_GATTC_DATA* p_data) {
    case MTU_EXCHANGE_IN_PROGRESS:
      LOG_INFO("Enqueue MTU Request  - waiting for response on p_clcb %p",
               p_clcb);
      bta_gattc_enqueue(p_clcb, p_data);
      /* MTU request is in progress and this one will not be sent to remote
       * device. Just push back on the queue and response will be sent up to
       * the upper layer when MTU Exchange will be completed.
       */
      p_clcb->p_q_cmd_queue.push_back(p_data);
      return;

    case MTU_EXCHANGE_NOT_DONE_YET: