mirror of
https://github.com/bluekitchen/btstack.git
synced 2025-01-29 03:32:49 +00:00
hsp_hs: fix disconnect if audio not connected
This commit is contained in:
parent
9dc32eb425
commit
08ecd8bd8c
@ -14,6 +14,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
|
||||
- sm: fix secure connection pairing as peripheral when local user confirmation happens after remote one
|
||||
- A2DP Source: only connect to remote sink stream endpoints
|
||||
- btstack_hal_flash_memory: fix write of 0xff bytes to simulated flash
|
||||
- hsp_hs: fix disconnect if audio not connected
|
||||
|
||||
### Added
|
||||
- example/le_mitm: MITM implementation that forwards ATT PDUs and allows for pairing
|
||||
|
@ -312,13 +312,8 @@ void hsp_hs_disconnect(void){
|
||||
return;
|
||||
}
|
||||
|
||||
if (hsp_state < HSP_W4_SCO_CONNECTED){
|
||||
hsp_state = HSP_W2_DISCONNECT_RFCOMM;
|
||||
return;
|
||||
}
|
||||
|
||||
hsp_disconnect_rfcomm = 1;
|
||||
hsp_run();
|
||||
hsp_establish_audio_connection = 0;
|
||||
rfcomm_disconnect(rfcomm_cid);
|
||||
}
|
||||
|
||||
|
||||
@ -409,13 +404,6 @@ static void hsp_run(void){
|
||||
return;
|
||||
}
|
||||
|
||||
if (hsp_disconnect_rfcomm){
|
||||
hsp_disconnect_rfcomm = 0;
|
||||
hsp_establish_audio_connection = 0;
|
||||
rfcomm_disconnect(rfcomm_cid);
|
||||
return;
|
||||
}
|
||||
|
||||
if (hsp_establish_audio_connection){
|
||||
if (!rfcomm_can_send_packet_now(rfcomm_cid)) {
|
||||
rfcomm_request_can_send_now_event(rfcomm_cid);
|
||||
|
Loading…
x
Reference in New Issue
Block a user