mirror of
https://github.com/bluekitchen/btstack.git
synced 2025-02-28 16:11:24 +00:00
gap: keep remote device in whitelist on connection complete
This commit is contained in:
parent
7a92a9db0f
commit
34f5575806
@ -2642,10 +2642,6 @@ static void event_handler(uint8_t *packet, uint16_t size){
|
|||||||
conn = hci_connection_for_bd_addr_and_type(addr, addr_type);
|
conn = hci_connection_for_bd_addr_and_type(addr, addr_type);
|
||||||
|
|
||||||
#ifdef ENABLE_LE_CENTRAL
|
#ifdef ENABLE_LE_CENTRAL
|
||||||
// if auto-connect, remove from whitelist in both roles
|
|
||||||
if (hci_stack->le_connecting_state == LE_CONNECTING_WHITELIST){
|
|
||||||
hci_whitelist_remove(addr_type, addr);
|
|
||||||
}
|
|
||||||
// handle error: error is reported only to the initiator -> outgoing connection
|
// handle error: error is reported only to the initiator -> outgoing connection
|
||||||
if (packet[3]){
|
if (packet[3]){
|
||||||
|
|
||||||
@ -2675,7 +2671,8 @@ static void event_handler(uint8_t *packet, uint16_t size){
|
|||||||
if (packet[6] == HCI_ROLE_MASTER){
|
if (packet[6] == HCI_ROLE_MASTER){
|
||||||
#ifdef ENABLE_LE_CENTRAL
|
#ifdef ENABLE_LE_CENTRAL
|
||||||
// if we're master on an le connection, it was an outgoing connection and we're done with it
|
// if we're master on an le connection, it was an outgoing connection and we're done with it
|
||||||
if (hci_is_le_connection(conn)){
|
// note: no hci_connection_t object exists yet for connect with whitelist
|
||||||
|
if (hci_is_le_connection_type(addr_type)){
|
||||||
hci_stack->le_connecting_state = LE_CONNECTING_IDLE;
|
hci_stack->le_connecting_state = LE_CONNECTING_IDLE;
|
||||||
hci_stack->le_connecting_request = LE_CONNECTING_IDLE;
|
hci_stack->le_connecting_request = LE_CONNECTING_IDLE;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user