mirror of
https://github.com/bluekitchen/btstack.git
synced 2025-02-04 06:39:53 +00:00
avrcp: extract avrcp_handle_sdp_client_query_attribute_value
This commit is contained in:
parent
ce6a59c0b1
commit
7b81669adb
@ -435,21 +435,10 @@ void avrcp_emit_connection_closed(btstack_packet_handler_t callback, uint16_t av
|
||||
(*callback)(HCI_EVENT_PACKET, 0, event, sizeof(event));
|
||||
}
|
||||
|
||||
void avrcp_handle_sdp_client_query_result(uint8_t packet_type, uint16_t channel, uint8_t *packet, uint16_t size){
|
||||
avrcp_connection_t * connection = get_avrcp_connection_for_avrcp_cid(sdp_query_context->role, sdp_query_context->avrcp_cid);
|
||||
if (!connection) return;
|
||||
if (connection->state != AVCTP_CONNECTION_W4_SDP_QUERY_COMPLETE) return;
|
||||
|
||||
UNUSED(packet_type);
|
||||
UNUSED(channel);
|
||||
UNUSED(size);
|
||||
uint8_t status;
|
||||
void avrcp_handle_sdp_client_query_attribute_value(avrcp_connection_t * connection , uint8_t *packet){
|
||||
des_iterator_t des_list_it;
|
||||
des_iterator_t prot_it;
|
||||
// uint32_t avdtp_remote_uuid = 0;
|
||||
|
||||
switch (hci_event_packet_get_type(packet)){
|
||||
case SDP_EVENT_QUERY_ATTRIBUTE_VALUE:
|
||||
// Handle new SDP record
|
||||
if (sdp_event_query_attribute_byte_get_record_id(packet) != sdp_query_context->record_id) {
|
||||
sdp_query_context->record_id = sdp_event_query_attribute_byte_get_record_id(packet);
|
||||
@ -569,6 +558,22 @@ void avrcp_handle_sdp_client_query_result(uint8_t packet_type, uint16_t channel,
|
||||
} else {
|
||||
log_error("SDP attribute value buffer size exceeded: available %d, required %d", attribute_value_buffer_size, sdp_event_query_attribute_byte_get_attribute_length(packet));
|
||||
}
|
||||
}
|
||||
|
||||
void avrcp_handle_sdp_client_query_result(uint8_t packet_type, uint16_t channel, uint8_t *packet, uint16_t size){
|
||||
avrcp_connection_t * connection = get_avrcp_connection_for_avrcp_cid(sdp_query_context->role, sdp_query_context->avrcp_cid);
|
||||
if (!connection) return;
|
||||
if (connection->state != AVCTP_CONNECTION_W4_SDP_QUERY_COMPLETE) return;
|
||||
|
||||
UNUSED(packet_type);
|
||||
UNUSED(channel);
|
||||
UNUSED(size);
|
||||
|
||||
uint8_t status;
|
||||
|
||||
switch (hci_event_packet_get_type(packet)){
|
||||
case SDP_EVENT_QUERY_ATTRIBUTE_VALUE:
|
||||
avrcp_handle_sdp_client_query_attribute_value(connection, packet);
|
||||
break;
|
||||
|
||||
case SDP_EVENT_QUERY_COMPLETE:{
|
||||
|
Loading…
x
Reference in New Issue
Block a user