hfp: enable call of SLC disconnect while the audio session is running

This commit is contained in:
Milanka Ringwald 2019-01-25 16:51:39 +01:00
parent 0aee97eff3
commit 64f19ded88

View File

@ -549,8 +549,7 @@ static int hfp_hf_run_for_audio_connection(hfp_connection_t * hfp_connection){
if (hfp_connection->state < HFP_SERVICE_LEVEL_CONNECTION_ESTABLISHED ||
hfp_connection->state > HFP_W2_DISCONNECT_SCO) return 0;
if (hfp_connection->state == HFP_AUDIO_CONNECTION_ESTABLISHED && hfp_connection->release_audio_connection){
if (hfp_connection->release_audio_connection){
hfp_connection->state = HFP_W4_SCO_DISCONNECTED;
hfp_connection->release_audio_connection = 0;
gap_disconnect(hfp_connection->sco_handle);