Bluetooth: host: Ifdef starting of background scanner in init
Starting a background scanner for auto-connection is an API that is only available when whitelist API is not enabled. There is currently no way to set this bit when the whitelist API is enabled so there is not any issues with the current code, but it is still not correct. Signed-off-by: Joakim Andersson <joakim.andersson@nordicsemi.no>
This commit is contained in:
parent
0861c8c834
commit
cc6b8c3a6f
1 changed files with 2 additions and 0 deletions
|
@ -2652,12 +2652,14 @@ int bt_conn_init(void)
|
|||
continue;
|
||||
}
|
||||
|
||||
#if !defined(CONFIG_BT_WHITELIST)
|
||||
if (atomic_test_bit(conn->flags,
|
||||
BT_CONN_AUTO_CONNECT)) {
|
||||
/* Only the default identity is supported */
|
||||
conn->id = BT_ID_DEFAULT;
|
||||
bt_conn_set_state(conn, BT_CONN_CONNECT_SCAN);
|
||||
}
|
||||
#endif /* !defined(CONFIG_BT_WHITELIST) */
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue