Commit: 291dbf2c94ed956c2269097d1ed859488b08c2bd
Parent: 39ca6601a0f6a1e2641d3849f79bc8f91e368546
Author: Sonny Sasaka <sonnysasaka@chromium.org>
Committer: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
Date: 2020-08-21 23:15:37
Tree: a7cab7c0676723f38cf27b57c48668e29df92355

device: Fix race condition between device connection and disconnection When Connect() is called and waiting for return, dev_disconnected may be called due to MGMT_EV_DEVICE_DISCONNECTED event from kernel. In that case reply to client that the connection failed otherwise the dbus method will timeout because bluetoothd never replies. Tested with simulation of a lot of Connect() to bluetooth devices and check that error is returned from bluetoothd rather than dbus timeout when this race condition happens.

Diffstat

M src/device.c | 13 +++++++++++++

1 files changed, 13 insertions(+), 0 deletions(-)

View Full Diff | Patch