mirror of
https://github.com/bluekitchen/btstack.git
synced 2025-03-26 11:37:10 +00:00
avdtp: check avdtp_validate_media_configuration status
This commit is contained in:
parent
3998d54e25
commit
8a1de4839a
@ -510,8 +510,12 @@ uint8_t avdtp_validate_media_configuration(const avdtp_stream_endpoint_t *stream
|
||||
return 0;
|
||||
}
|
||||
uint8_t event[AVDTP_MEDIA_CONFIG_OTHER_EVENT_LEN];
|
||||
|
||||
uint16_t size = 0;
|
||||
avdtp_setup_media_codec_config_event(event, sizeof(event), stream_endpoint, avdtp_cid, reconfigure, media_codec, &size);
|
||||
uint8_t status = avdtp_setup_media_codec_config_event(event, sizeof(event), stream_endpoint, avdtp_cid, reconfigure, media_codec, &size);
|
||||
if (status != ERROR_CODE_SUCCESS){
|
||||
return status;
|
||||
}
|
||||
return (*callback)(stream_endpoint, event, size);
|
||||
}
|
||||
|
||||
|
@ -122,7 +122,7 @@ avdtp_acceptor_handle_configuration_command(avdtp_connection_t *connection, int
|
||||
if ((sep.configured_service_categories & (1 << AVDTP_MEDIA_CODEC)) != 0){
|
||||
const adtvp_media_codec_capabilities_t * media = &sep.configuration.media_codec;
|
||||
uint8_t error_code = avdtp_validate_media_configuration(stream_endpoint, connection->avdtp_cid, 0, media);
|
||||
if (error_code != 0){
|
||||
if (error_code != ERROR_CODE_SUCCESS){
|
||||
log_info("media codec rejected by validator, error 0x%02x", error_code);
|
||||
connection->reject_service_category = AVDTP_MEDIA_CODEC;
|
||||
connection->error_code = error_code;
|
||||
|
Loading…
x
Reference in New Issue
Block a user