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

Commit ec2cd347 authored by Chris Manton's avatar Chris Manton
Browse files

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

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

Change-Id: Idc88a3c96326ac506048c27ef73f66fc71a15cc9
parent afe009b2
Loading
Loading
Loading
Loading
+11 −7
Original line number Diff line number Diff line
@@ -244,16 +244,20 @@ static void notify_start_failed(tBTA_AV_SCB* p_scb) {
  LOG_ERROR("%s: peer %s role:0x%x bta_channel:%d bta_handle:0x%x", __func__,
            ADDRESS_TO_LOGGABLE_CSTR(p_scb->PeerAddress()), p_scb->role,
            p_scb->chnl, p_scb->hndl);
  tBTA_AV_START start;
  tBTA_AV bta_av_data = {
      .start =
          {
              .chnl = p_scb->chnl,
              .hndl = p_scb->hndl,
              .status = BTA_AV_FAIL,
              .initiator = true,
              .suspending = false,
          },
  };

  /* if start failed, clear role */
  p_scb->role &= ~BTA_AV_ROLE_START_INT;
  start.chnl = p_scb->chnl;
  start.status = BTA_AV_FAIL;
  start.initiator = true;
  start.hndl = p_scb->hndl;

  tBTA_AV bta_av_data;
  bta_av_data.start = start;
  (*bta_av_cb.p_cback)(BTA_AV_START_EVT, &bta_av_data);
}