mirror of
https://github.com/bluekitchen/btstack.git
synced 2025-02-24 21:39:55 +00:00
avrcp: only parse get element attributes for AVRCP_CTYPE_RESPONSE_IMPLEMENTED_STABLE or AVRCP_CTYPE_RESPONSE_CHANGED_STABLE
This commit is contained in:
parent
849f10d83f
commit
4bb88fd7fc
@ -864,6 +864,7 @@ static void avrcp_handle_l2cap_data_packet_for_signaling_connection(avrcp_connec
|
|||||||
uint8_t num_string_attributes = 0;
|
uint8_t num_string_attributes = 0;
|
||||||
uint16_t total_event_payload_for_string_attributes = HCI_EVENT_PAYLOAD_SIZE-2;
|
uint16_t total_event_payload_for_string_attributes = HCI_EVENT_PAYLOAD_SIZE-2;
|
||||||
uint16_t max_string_attribute_value_len = 0;
|
uint16_t max_string_attribute_value_len = 0;
|
||||||
|
if (ctype == AVRCP_CTYPE_RESPONSE_IMPLEMENTED_STABLE || ctype == AVRCP_CTYPE_RESPONSE_CHANGED_STABLE){
|
||||||
for (i = 0; i < num_attributes; i++){
|
for (i = 0; i < num_attributes; i++){
|
||||||
avrcp_media_attribute_id_t attr_id = big_endian_read_32(packet, pos);
|
avrcp_media_attribute_id_t attr_id = big_endian_read_32(packet, pos);
|
||||||
pos += 4;
|
pos += 4;
|
||||||
@ -900,6 +901,8 @@ static void avrcp_handle_l2cap_data_packet_for_signaling_connection(avrcp_connec
|
|||||||
}
|
}
|
||||||
pos += attr_value_length;
|
pos += attr_value_length;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// subtract space for fixed fields
|
// subtract space for fixed fields
|
||||||
total_event_payload_for_string_attributes -= 14 + 4; // 4 for '\0'
|
total_event_payload_for_string_attributes -= 14 + 4; // 4 for '\0'
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user