From f53d6fa721d774d38d4b9de542cdb68a05d9a71b Mon Sep 17 00:00:00 2001 From: Milanka Ringwald Date: Wed, 19 Jul 2017 16:02:24 +0200 Subject: [PATCH] avdtp: use configuration field --- src/classic/avdtp.c | 11 ++++++----- src/classic/avdtp_initiator.c | 2 +- 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/src/classic/avdtp.c b/src/classic/avdtp.c index 547cc81d7..12b6755cc 100644 --- a/src/classic/avdtp.c +++ b/src/classic/avdtp.c @@ -862,8 +862,8 @@ void avdtp_set_configuration(uint16_t avdtp_cid, uint8_t local_seid, uint8_t rem connection->initiator_transaction_label++; connection->remote_seid = remote_seid; connection->local_seid = local_seid; - stream_endpoint->remote_capabilities_bitmap = configured_services_bitmap; - stream_endpoint->remote_capabilities = configuration; + stream_endpoint->remote_configuration_bitmap = configured_services_bitmap; + stream_endpoint->remote_configuration = configuration; stream_endpoint->initiator_config_state = AVDTP_INITIATOR_W2_SET_CONFIGURATION; avdtp_request_can_send_now_initiator(connection, connection->l2cap_signaling_cid); } @@ -892,9 +892,10 @@ void avdtp_reconfigure(uint16_t avdtp_cid, uint8_t local_seid, uint8_t remote_se connection->initiator_transaction_label++; connection->remote_seid = remote_seid; connection->local_seid = local_seid; - stream_endpoint->remote_capabilities_bitmap = configured_services_bitmap; - stream_endpoint->remote_capabilities = configuration; + stream_endpoint->remote_configuration_bitmap = configured_services_bitmap; + stream_endpoint->remote_configuration = configuration; stream_endpoint->initiator_config_state = AVDTP_INITIATOR_W2_RECONFIGURE_STREAM_WITH_SEID; + printf("AVDTP_INITIATOR_W2_RECONFIGURE_STREAM_WITH_SEID \n"); avdtp_request_can_send_now_initiator(connection, connection->l2cap_signaling_cid); } @@ -1032,4 +1033,4 @@ uint8_t avdtp_choose_sbc_max_bitpool_value(avdtp_stream_endpoint_t * stream_endp uint8_t avdtp_choose_sbc_min_bitpool_value(avdtp_stream_endpoint_t * stream_endpoint, uint8_t remote_min_bitpool_value){ uint8_t * media_codec = stream_endpoint->sep.capabilities.media_codec.media_codec_information; return btstack_max(media_codec[2], remote_min_bitpool_value); -} \ No newline at end of file +} diff --git a/src/classic/avdtp_initiator.c b/src/classic/avdtp_initiator.c index 578038d2c..d97fd69be 100644 --- a/src/classic/avdtp_initiator.c +++ b/src/classic/avdtp_initiator.c @@ -357,7 +357,7 @@ void avdtp_initiator_stream_config_subsm_run(avdtp_connection_t * connection, av connection->signaling_packet.signal_identifier = AVDTP_SI_RECONFIGURE; } - avdtp_prepare_capabilities(&connection->signaling_packet, connection->initiator_transaction_label, stream_endpoint->remote_capabilities_bitmap, stream_endpoint->remote_capabilities, connection->signaling_packet.signal_identifier); + avdtp_prepare_capabilities(&connection->signaling_packet, connection->initiator_transaction_label, stream_endpoint->remote_configuration_bitmap, stream_endpoint->remote_configuration, connection->signaling_packet.signal_identifier); l2cap_reserve_packet_buffer(); uint8_t * out_buffer = l2cap_get_outgoing_buffer(); uint16_t pos = avdtp_signaling_create_fragment(connection->l2cap_signaling_cid, &connection->signaling_packet, out_buffer);