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

Commit 19036181 authored by TreeHugger Robot's avatar TreeHugger Robot Committed by Android (Google) Code Review
Browse files

Merge changes from topic "am-662f3e36-36cc-485d-824b-f28c01eea384" into cw-f-dev

* changes:
  [automerger] DO NOT MERGE: Don't reuse buffer when building response am: 45104526 am: 57465212 am: b249e1cc
  [automerger] DO NOT MERGE: Don't reuse buffer when building response am: 45104526 am: 57465212
  [automerger] DO NOT MERGE: Don't reuse buffer when building response am: 45104526
  DO NOT MERGE: Don't reuse buffer when building response
parents 156fe9b3 0ae646a7
Loading
Loading
Loading
Loading
+5 −4
Original line number Original line Diff line number Diff line
@@ -316,15 +316,15 @@ static BT_HDR * avrc_proc_vendor_command(UINT8 handle, UINT8 label,


    if (status != AVRC_STS_NO_ERROR)
    if (status != AVRC_STS_NO_ERROR)
    {
    {
        /* use the current GKI buffer to build/send the reject message */
        p_rsp = (BT_HDR*)osi_malloc(BT_DEFAULT_BUFFER_SIZE);
        p_data = (UINT8 *)(p_pkt+1) + p_pkt->offset;
        p_rsp->offset = p_pkt->offset;
        p_data = (uint8_t*)(p_rsp + 1) + p_pkt->offset;
        *p_data++ = AVRC_RSP_REJ;
        *p_data++ = AVRC_RSP_REJ;
        p_data += AVRC_VENDOR_HDR_SIZE; /* pdu */
        p_data += AVRC_VENDOR_HDR_SIZE; /* pdu */
        *p_data++ = 0;                  /* pkt_type */
        *p_data++ = 0;                  /* pkt_type */
        UINT16_TO_BE_STREAM(p_data, 1); /* len */
        UINT16_TO_BE_STREAM(p_data, 1); /* len */
        *p_data++ = status;             /* error code */
        *p_data++ = status;             /* error code */
        p_pkt->len = AVRC_VENDOR_HDR_SIZE + 5;
        p_rsp->len = AVRC_VENDOR_HDR_SIZE + 5;
        p_rsp = p_pkt;
    }
    }


    return p_rsp;
    return p_rsp;
@@ -472,6 +472,7 @@ static UINT8 avrc_proc_far_msg(UINT8 handle, UINT8 label, UINT8 cr, BT_HDR **pp_
            if (p_rsp)
            if (p_rsp)
            {
            {
                AVCT_MsgReq( handle, label, AVCT_RSP, p_rsp);
                AVCT_MsgReq( handle, label, AVCT_RSP, p_rsp);
                osi_free_and_reset((void **)pp_pkt);
                drop_code = 3;
                drop_code = 3;
            }
            }
            else if (p_msg->hdr.opcode == AVRC_OP_DROP)
            else if (p_msg->hdr.opcode == AVRC_OP_DROP)