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

Commit 165b2ca7 authored by Chris Manton's avatar Chris Manton
Browse files

Properly init bta::av::bta_av_aact message structures 20/20

Bug: 261213459
Test: gd/cert/run
Tag: #refactor
BYPASS_LONG_LINES_REASON: Bluetooth likes 120 lines

Change-Id: Icde0f1a6882b8d0abed0442d0dc06495d81c7d6e
parent 877a45e3
Loading
Loading
Loading
Loading
+10 −7
Original line number Diff line number Diff line
@@ -2934,15 +2934,18 @@ void bta_av_open_rc(tBTA_AV_SCB* p_scb, tBTA_AV_DATA* p_data) {
          __func__);
      alarm_cancel(p_scb->avrc_ct_timer);

      tBTA_AV_START start;
      start.chnl = p_scb->chnl;
      start.status = BTA_AV_FAIL_ROLE;
      start.initiator = true;
      start.hndl = p_scb->hndl;
      tBTA_AV bta_av_data = {
          .start =
              {
                  .chnl = p_scb->chnl,
                  .hndl = p_scb->hndl,
                  .status = BTA_AV_FAIL_ROLE,
                  .initiator = true,
                  .suspending = false,
              },
      };
      p_scb->wait &= ~BTA_AV_WAIT_ROLE_SW_BITS;
      bta_av_cb.rs_idx = 0;
      tBTA_AV bta_av_data;
      bta_av_data.start = start;
      (*bta_av_cb.p_cback)(BTA_AV_START_EVT, &bta_av_data);
    } else {
      /* role switch is done. continue to start streaming */