mirror of
https://github.com/bluekitchen/btstack.git
synced 2025-01-03 23:47:08 +00:00
a2dp_source: handle reject of reconfigure command
This commit is contained in:
parent
aef8999158
commit
5bea6ce475
@ -662,7 +662,17 @@ static void a2dp_source_packet_handler_internal(uint8_t packet_type, uint16_t ch
|
||||
|
||||
if (avdtp_subevent_signaling_reject_get_is_initiator(packet) == 0) break;
|
||||
|
||||
connection->a2dp_source_state = A2DP_CONNECTED;
|
||||
switch (connection->a2dp_source_state) {
|
||||
case A2DP_W2_RECONFIGURE_WITH_SEID:
|
||||
log_info("A2DP reconfigure failed ... local seid 0x%02x, active remote seid 0x%02x", avdtp_stream_endpoint_seid(connection->a2dp_source_local_stream_endpoint), connection->a2dp_source_local_stream_endpoint->remote_sep.seid);
|
||||
a2dp_signaling_emit_reconfigured(cid, avdtp_stream_endpoint_seid(connection->a2dp_source_local_stream_endpoint), ERROR_CODE_UNSPECIFIED_ERROR);
|
||||
connection->a2dp_source_state = A2DP_STREAMING_OPENED;
|
||||
break;
|
||||
default:
|
||||
connection->a2dp_source_state = A2DP_CONNECTED;
|
||||
break;
|
||||
}
|
||||
|
||||
a2dp_replace_subevent_id_and_emit_cmd(a2dp_source_packet_handler_user, packet, size, A2DP_SUBEVENT_COMMAND_REJECTED);
|
||||
break;
|
||||
|
||||
|
@ -284,6 +284,10 @@ void avdtp_initiator_stream_config_subsm(avdtp_connection_t *connection, uint8_t
|
||||
connection->configuration_state = AVDTP_CONFIGURATION_STATE_IDLE;
|
||||
log_info("Received reject for set configuration, role changed from initiator to acceptor. TODO: implement retry.");
|
||||
break;
|
||||
case AVDTP_SI_RECONFIGURE:
|
||||
stream_endpoint->state = AVDTP_STREAM_ENDPOINT_OPENED;
|
||||
log_info("Received reject for reconfigure, state = opened");
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user