1
0
mirror of https://github.com/bluekitchen/btstack.git synced 2025-03-24 13:43:38 +00:00

a2dp: remove address check

This commit is contained in:
Milanka Ringwald 2017-08-09 15:00:19 +02:00
parent 55ab84a416
commit 0fd69bb60e
4 changed files with 0 additions and 11 deletions

@ -271,8 +271,6 @@ static void packet_handler(uint8_t packet_type, uint16_t channel, uint8_t *packe
switch (packet[2]){
case AVDTP_SUBEVENT_SIGNALING_CONNECTION_ESTABLISHED:
avdtp_subevent_signaling_connection_established_get_bd_addr(packet, address);
if (memcmp(address, &sc.remote_addr, 6) != 0) break;
cid = avdtp_subevent_signaling_connection_established_get_avdtp_cid(packet);
status = avdtp_subevent_signaling_connection_established_get_status(packet);
if (status != 0){
@ -280,7 +278,6 @@ static void packet_handler(uint8_t packet_type, uint16_t channel, uint8_t *packe
a2dp_streaming_emit_connection_established(a2dp_sink_context.a2dp_callback, cid, 0, 0, status);
break;
}
app_state = A2DP_CONNECTED;
log_info("AVDTP_SUBEVENT_SIGNALING_CONNECTION_ESTABLISHED, avdtp cid 0x%02x ---", cid);
break;

@ -200,8 +200,6 @@ static void packet_handler(uint8_t packet_type, uint16_t channel, uint8_t *packe
switch (packet[2]){
case AVDTP_SUBEVENT_SIGNALING_CONNECTION_ESTABLISHED:
avdtp_subevent_signaling_connection_established_get_bd_addr(packet, address);
if (memcmp(address, &sc.remote_addr, 6) != 0) break;
cid = avdtp_subevent_signaling_connection_established_get_avdtp_cid(packet);
status = avdtp_subevent_signaling_connection_established_get_status(packet);
if (status != 0){
@ -218,7 +216,6 @@ static void packet_handler(uint8_t packet_type, uint16_t channel, uint8_t *packe
break;
case AVDTP_SUBEVENT_SIGNALING_SEP_FOUND:
// TODO check cid
if (app_state != A2DP_W2_DISCOVER_SEPS) return;
sep.seid = avdtp_subevent_signaling_sep_found_get_remote_seid(packet);
sep.in_use = avdtp_subevent_signaling_sep_found_get_in_use(packet);
@ -228,7 +225,6 @@ static void packet_handler(uint8_t packet_type, uint16_t channel, uint8_t *packe
break;
case AVDTP_SUBEVENT_SIGNALING_MEDIA_CODEC_SBC_CAPABILITY:{
// TODO check cid
if (!sc.local_stream_endpoint) return;
uint8_t sampling_frequency = avdtp_choose_sbc_sampling_frequency(sc.local_stream_endpoint, avdtp_subevent_signaling_media_codec_sbc_capability_get_sampling_frequency_bitmap(packet));
uint8_t channel_mode = avdtp_choose_sbc_channel_mode(sc.local_stream_endpoint, avdtp_subevent_signaling_media_codec_sbc_capability_get_channel_mode_bitmap(packet));

@ -512,7 +512,6 @@ void avdtp_packet_handler(uint8_t packet_type, uint16_t channel, uint8_t *packet
case L2CAP_EVENT_INCOMING_CONNECTION:
l2cap_event_incoming_connection_get_address(packet, event_addr);
local_cid = l2cap_event_incoming_connection_get_local_cid(packet);
connection = avdtp_connection_for_bd_addr(event_addr, context);
if (!connection || connection->state == AVDTP_SIGNALING_CONNECTION_W4_L2CAP_CONNECTED){
@ -551,7 +550,6 @@ void avdtp_packet_handler(uint8_t packet_type, uint16_t channel, uint8_t *packet
log_error("unexpected PSM - Not implemented yet, avdtp sink: L2CAP_EVENT_CHANNEL_OPENED");
return;
}
// log_info("L2CAP_EVENT_CHANNEL_OPENED: Channel successfully opened: %s, handle 0x%02x, psm 0x%02x, local cid 0x%02x, remote cid 0x%02x",
// bd_addr_to_str(event_addr), l2cap_event_channel_opened_get_handle(packet), psm, local_cid, l2cap_event_channel_opened_get_remote_cid(packet));

@ -565,8 +565,6 @@ void avrcp_packet_handler(uint8_t packet_type, uint16_t channel, uint8_t *packet
switch (hci_event_packet_get_type(packet)) {
case HCI_EVENT_DISCONNECTION_COMPLETE:
// connection closed -> quit test app
// status = hci_event_disconnection_complete_get_status(packet);
avrcp_emit_connection_closed(context->avrcp_callback, 0);
break;
case L2CAP_EVENT_INCOMING_CONNECTION: