mirror of
https://git.kernel.org/pub/scm/bluetooth/bluez.git
synced 2024-11-23 20:24:21 +08:00
device: Fix Pair method not setting auto_connect
Due to commit 507ba12483
("profile: Remove probe_on_discover")
disable_auto_connect may be set when a service is probed but the device
is still temporary which is normally the result of service being
discovered over advertisement rather than connection.
To fix this the Device.Pair method needs to check if the
disable_auto_connect flag has been set and then reset it set auto_connect
which is similar to how Device.Connect works.
This commit is contained in:
parent
2daddeada0
commit
3946757820
@ -3114,6 +3114,11 @@ static DBusMessage *pair_device(DBusConnection *conn, DBusMessage *msg,
|
||||
* this in the ATT connect callback)
|
||||
*/
|
||||
if (bdaddr_type != BDADDR_BREDR) {
|
||||
if (device->disable_auto_connect) {
|
||||
device->disable_auto_connect = FALSE;
|
||||
device_set_auto_connect(device, TRUE);
|
||||
}
|
||||
|
||||
if (!state->connected && btd_le_connect_before_pairing())
|
||||
err = device_connect_le(device);
|
||||
else
|
||||
|
Loading…
Reference in New Issue
Block a user