Parent: a3e66a6b74581bd4dceca7eecbcb736108b3dd16
Author: Petri Gynther <pgynther@google.com>
Committer: Johan Hedberg <johan.hedberg@intel.com>
Date: 2014-06-26 10:54:54
Tree: 7157f383e85b4e50e3be3d7fb20404a16829ef92
core: Fix adapter_connect_list_add() adapter_connect_list_add() needs to ensure that trigger_passive_scanning() is called even for existing devices on the connect list. This issue can be seen with BLE HoG remotes trying to reconnect to BlueZ. If the connection fails, att_error_cb() adds the failed device back to connect list, but since the device is already on the list, no code ends up calling trigger_passive_scanning(). After this point, passive scanning is disabled and remains disabled for good, and BLE reconnects to BlueZ no longer work. bluetoothd[931]: src/adapter.c:device_found_callback() hci0 addr ... bluetoothd[931]: src/device.c:device_set_legacy() legacy 0 bluetoothd[931]: src/adapter.c:stop_passive_scanning() bluetoothd[931]: src/adapter.c:stop_passive_scanning_complete() status 0x00 (Success) bluetoothd[931]: src/device.c:device_connect_le() Connection attempt to: ... bluetoothd[931]: src/adapter.c:discovering_callback() hci0 type 6 discovering 0 bluetoothd[931]: src/adapter.c:connect_failed_callback() hci0 ... status 2 bluetoothd[931]: plugins/policy.c:conn_fail_cb() status 2 bluetoothd[931]: src/adapter.c:bonding_attempt_complete() hci0 bdaddr ... type 1 status 0x2 bluetoothd[931]: src/device.c:device_bonding_complete() bonding (nil) status 0x02 bluetoothd[931]: src/device.c:device_bonding_failed() status 2 bluetoothd[931]: src/adapter.c:resume_discovery() bluetoothd[931]: src/device.c:att_connect_cb() connect error: Transport endpoint is not connected (134) bluetoothd[931]: src/device.c:att_error_cb() Enabling automatic connections bluetoothd[931]: src/adapter.c:adapter_connect_list_add() ignoring already added device ... ... passive scan is disabled and remains disabled for good ...
Diffstat
| M | src/adapter.c | | | 3 | ++- |
1 files changed, 2 insertions(+), 1 deletions(-)