mirror of
https://git.kernel.org/pub/scm/bluetooth/bluez.git
synced 2024-11-26 21:54:33 +08:00
android: Fix for BT Turn off while pairing
This patch fix an issue when Android disables BT during ongoing paring. In this case mgmt did not accept any commands and BT gets in some unknown state. Since Android turns off BT anyway, it is ok to just cancel all the mgmt requests before send power off command.
This commit is contained in:
parent
8e9e005aa0
commit
f4ff283b43
@ -2903,6 +2903,9 @@ static void handle_disable_cmd(const void *buf, uint16_t len)
|
||||
goto reply;
|
||||
}
|
||||
|
||||
/* Cancel all pending requests. Need it in case of ongoing paring */
|
||||
mgmt_cancel_index(mgmt_if, adapter.index);
|
||||
|
||||
if (!set_mode(MGMT_OP_SET_POWERED, 0x00)) {
|
||||
status = HAL_STATUS_FAILED;
|
||||
goto reply;
|
||||
|
Loading…
Reference in New Issue
Block a user