mirror of
https://github.com/bluekitchen/btstack.git
synced 2025-03-28 19:20:54 +00:00
sm: rename sm_boding_requested to sm_pairing_requested
This commit is contained in:
parent
b1ec855b75
commit
09ea1b6290
12
src/ble/sm.c
12
src/ble/sm.c
@ -1269,9 +1269,9 @@ static void sm_address_resolution_handle_event(address_resolution_event_t event)
|
||||
break;
|
||||
}
|
||||
#ifdef ENABLE_LE_CENTRAL
|
||||
if (!sm_connection->sm_bonding_requested && !sm_connection->sm_security_request_received) break;
|
||||
if (!sm_connection->sm_pairing_requested && !sm_connection->sm_security_request_received) break;
|
||||
sm_connection->sm_security_request_received = 0;
|
||||
sm_connection->sm_bonding_requested = 0;
|
||||
sm_connection->sm_pairing_requested = 0;
|
||||
le_device_db_encryption_get(sm_connection->sm_le_db_index, NULL, NULL, ltk, NULL, NULL, NULL);
|
||||
if (!sm_is_null_key(ltk)){
|
||||
sm_connection->sm_engine_state = SM_INITIATOR_PH0_HAS_LTK;
|
||||
@ -1290,9 +1290,9 @@ static void sm_address_resolution_handle_event(address_resolution_event_t event)
|
||||
break;
|
||||
}
|
||||
#ifdef ENABLE_LE_CENTRAL
|
||||
if (!sm_connection->sm_bonding_requested && !sm_connection->sm_security_request_received) break;
|
||||
if (!sm_connection->sm_pairing_requested && !sm_connection->sm_security_request_received) break;
|
||||
sm_connection->sm_security_request_received = 0;
|
||||
sm_connection->sm_bonding_requested = 0;
|
||||
sm_connection->sm_pairing_requested = 0;
|
||||
sm_connection->sm_engine_state = SM_INITIATOR_PH1_W2_SEND_PAIRING_REQUEST;
|
||||
#endif
|
||||
break;
|
||||
@ -4081,11 +4081,11 @@ void sm_request_pairing(hci_con_handle_t con_handle){
|
||||
}
|
||||
break;
|
||||
default:
|
||||
sm_conn->sm_bonding_requested = 1;
|
||||
sm_conn->sm_pairing_requested = 1;
|
||||
break;
|
||||
}
|
||||
} else if (sm_conn->sm_engine_state == SM_GENERAL_IDLE){
|
||||
sm_conn->sm_bonding_requested = 1;
|
||||
sm_conn->sm_pairing_requested = 1;
|
||||
}
|
||||
}
|
||||
sm_run();
|
||||
|
@ -380,7 +380,7 @@ typedef struct sm_connection {
|
||||
hci_con_handle_t sm_handle;
|
||||
uint8_t sm_role; // 0 - IamMaster, 1 = IamSlave
|
||||
uint8_t sm_security_request_received;
|
||||
uint8_t sm_bonding_requested;
|
||||
uint8_t sm_pairing_requested;
|
||||
uint8_t sm_peer_addr_type;
|
||||
bd_addr_t sm_peer_address;
|
||||
security_manager_state_t sm_engine_state;
|
||||
|
Loading…
x
Reference in New Issue
Block a user