mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2025-11-02 09:01:50 -05:00
bluez5: backend-native: allow hanging up DIALING/ALERTING calls
This commit is contained in:
parent
03ab9dd771
commit
a2fc92ee69
1 changed files with 9 additions and 3 deletions
|
|
@ -1340,11 +1340,17 @@ static void hfp_hf_hangup(void *data, enum spa_bt_telephony_error *err)
|
||||||
struct impl *backend = rfcomm->backend;
|
struct impl *backend = rfcomm->backend;
|
||||||
char reply[20];
|
char reply[20];
|
||||||
|
|
||||||
if (call_data->call->state == CALL_STATE_INCOMING || call_data->call->state == CALL_STATE_ACTIVE) {
|
switch (call_data->call->state) {
|
||||||
|
case CALL_STATE_ACTIVE:
|
||||||
|
case CALL_STATE_DIALING:
|
||||||
|
case CALL_STATE_ALERTING:
|
||||||
|
case CALL_STATE_INCOMING:
|
||||||
rfcomm_send_cmd(rfcomm, "AT+CHUP");
|
rfcomm_send_cmd(rfcomm, "AT+CHUP");
|
||||||
} else if (call_data->call->state == CALL_STATE_WAITING) {
|
break;
|
||||||
|
case CALL_STATE_WAITING:
|
||||||
rfcomm_send_cmd(rfcomm, "AT+CHLD=0");
|
rfcomm_send_cmd(rfcomm, "AT+CHLD=0");
|
||||||
} else {
|
break;
|
||||||
|
default:
|
||||||
spa_log_info(backend->log, "Call not incoming, waiting or active: skip hangup");
|
spa_log_info(backend->log, "Call not incoming, waiting or active: skip hangup");
|
||||||
*err = BT_TELEPHONY_ERROR_INVALID_STATE;
|
*err = BT_TELEPHONY_ERROR_INVALID_STATE;
|
||||||
return;
|
return;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue