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

Commit 2eb17908 authored by Pavlin Radoslavov's avatar Pavlin Radoslavov Committed by Andre Eisenbach
Browse files

Fix a bug when responding to AVRCP UNIT_INFO and SUBUNIT_INFO

Assign appropriately the p_rsp_data pointer to point in the
buffer with the response.

Bug: 22307858
Change-Id: I2f77f290ff2c62c09b3be18ff047167a48c7c9d4
parent 26a4a1d7
Loading
Loading
Loading
Loading
+3 −3
Original line number Diff line number Diff line
@@ -598,7 +598,7 @@ static void avrc_msg_cback(UINT8 handle, UINT8 label, UINT8 cr,
            {
                /* send the response to the peer */
                p_rsp = avrc_copy_packet(p_pkt);
                p_rsp_data = avrc_get_data_ptr(p_pkt);
                p_rsp_data = avrc_get_data_ptr(p_rsp);
                *p_rsp_data = AVRC_RSP_IMPL_STBL;
                /* check & set the offset. set response code, set subunit_type & subunit_id,
                   set AVRC_OP_UNIT_INFO */
@@ -630,7 +630,7 @@ static void avrc_msg_cback(UINT8 handle, UINT8 label, UINT8 cr,
            {
                /* send the response to the peer */
                p_rsp = avrc_copy_packet(p_pkt);
                p_rsp_data = avrc_get_data_ptr(p_pkt);
                p_rsp_data = avrc_get_data_ptr(p_rsp);
                *p_rsp_data = AVRC_RSP_IMPL_STBL;
                /* check & set the offset. set response code, set (subunit_type & subunit_id),
                   set AVRC_OP_SUB_INFO, set (page & extention code) */
@@ -768,7 +768,7 @@ static void avrc_msg_cback(UINT8 handle, UINT8 label, UINT8 cr,
    {
        /* reject unsupported opcode */
        p_rsp = avrc_copy_packet(p_pkt);
        p_rsp_data = avrc_get_data_ptr(p_pkt);
        p_rsp_data = avrc_get_data_ptr(p_rsp);
        *p_rsp_data = AVRC_RSP_REJ;
#if (BT_USE_TRACES == TRUE)
        p_drop_msg = "rejected";