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

Commit 9a45b114 authored by Chris Manton's avatar Chris Manton
Browse files

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

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

Change-Id: Ia62277bb5ee349e85b666b7eb55c48ea82f6ed67
parent 54a09dfc
Loading
Loading
Loading
Loading
+9 −8
Original line number Diff line number Diff line
@@ -1276,14 +1276,15 @@ void bta_av_security_ind(tBTA_AV_SCB* p_scb, tBTA_AV_DATA* p_data) {
  p_scb->avdt_label = p_data->str_msg.msg.hdr.label;

  if (bta_av_cb.features & BTA_AV_FEAT_PROTECT) {
    tBTA_AV_PROTECT_REQ protect_req;
    protect_req.chnl = p_scb->chnl;
    protect_req.hndl = p_scb->hndl;
    protect_req.p_data = p_data->str_msg.msg.security_ind.p_data;
    protect_req.len = p_data->str_msg.msg.security_ind.len;

    tBTA_AV bta_av_data;
    bta_av_data.protect_req = protect_req;
    tBTA_AV bta_av_data = {
        .protect_req =
            {
                .chnl = p_scb->chnl,
                .hndl = p_scb->hndl,
                .p_data = p_data->str_msg.msg.security_ind.p_data,
                .len = p_data->str_msg.msg.security_ind.len,
            },
    };
    (*bta_av_cb.p_cback)(BTA_AV_PROTECT_REQ_EVT, &bta_av_data);
  }
  /* app doesn't support security indication; respond with failure */