mirror of
https://github.com/bluekitchen/btstack.git
synced 2025-01-03 23:47:08 +00:00
avdtp: do not repeat operation if flag already set
This commit is contained in:
parent
228f8c159c
commit
4e7bc04fcd
@ -1125,6 +1125,10 @@ uint8_t avdtp_start_stream(uint16_t avdtp_cid, uint8_t local_seid){
|
||||
return ERROR_CODE_COMMAND_DISALLOWED;
|
||||
}
|
||||
|
||||
if (stream_endpoint->start_stream == 1) {
|
||||
return ERROR_CODE_COMMAND_DISALLOWED;
|
||||
}
|
||||
|
||||
stream_endpoint->start_stream = 1;
|
||||
connection->initiator_local_seid = local_seid;
|
||||
connection->initiator_remote_seid = stream_endpoint->remote_sep.seid;
|
||||
@ -1154,6 +1158,10 @@ uint8_t avdtp_stop_stream(uint16_t avdtp_cid, uint8_t local_seid){
|
||||
return ERROR_CODE_COMMAND_DISALLOWED;
|
||||
}
|
||||
|
||||
if (stream_endpoint->close_stream == 1) {
|
||||
return ERROR_CODE_COMMAND_DISALLOWED;
|
||||
}
|
||||
|
||||
stream_endpoint->close_stream = 1;
|
||||
connection->initiator_local_seid = local_seid;
|
||||
connection->initiator_remote_seid = stream_endpoint->remote_sep.seid;
|
||||
@ -1183,6 +1191,10 @@ uint8_t avdtp_abort_stream(uint16_t avdtp_cid, uint8_t local_seid){
|
||||
return ERROR_CODE_COMMAND_DISALLOWED;
|
||||
}
|
||||
|
||||
if (stream_endpoint->abort_stream == 1) {
|
||||
return ERROR_CODE_COMMAND_DISALLOWED;
|
||||
}
|
||||
|
||||
stream_endpoint->abort_stream = 1;
|
||||
connection->initiator_local_seid = local_seid;
|
||||
connection->initiator_remote_seid = stream_endpoint->remote_sep.seid;
|
||||
@ -1211,6 +1223,10 @@ uint8_t avdtp_suspend_stream(uint16_t avdtp_cid, uint8_t local_seid){
|
||||
return ERROR_CODE_COMMAND_DISALLOWED;
|
||||
}
|
||||
|
||||
if (stream_endpoint->suspend_stream == 1) {
|
||||
return ERROR_CODE_COMMAND_DISALLOWED;
|
||||
}
|
||||
|
||||
stream_endpoint->suspend_stream = 1;
|
||||
connection->initiator_local_seid = local_seid;
|
||||
connection->initiator_remote_seid = stream_endpoint->remote_sep.seid;
|
||||
|
Loading…
Reference in New Issue
Block a user