diff options
author | Pavlin Radoslavov <pavlin@google.com> | 2015-07-09 17:57:20 -0700 |
---|---|---|
committer | Andre Eisenbach <eisenbach@google.com> | 2015-07-10 09:41:05 +0000 |
commit | 08c08fc0015c3c5e864da080dba0712ee89a6712 (patch) | |
tree | 8d0647cb0ce246e777da99c987a9c1fa874b2df6 | |
parent | 26c3dd41b294b7f6d0ca7198b00ed1e1ef32dfb9 (diff) | |
download | android_system_bt-08c08fc0015c3c5e864da080dba0712ee89a6712.tar.gz android_system_bt-08c08fc0015c3c5e864da080dba0712ee89a6712.tar.bz2 android_system_bt-08c08fc0015c3c5e864da080dba0712ee89a6712.zip |
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
-rw-r--r-- | stack/avrc/avrc_api.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/stack/avrc/avrc_api.c b/stack/avrc/avrc_api.c index ab3707e73..efed52016 100644 --- a/stack/avrc/avrc_api.c +++ b/stack/avrc/avrc_api.c @@ -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"; |