sm: deprecated sm_send_security_request

This commit is contained in:
Matthias Ringwald 2020-12-04 15:16:00 +01:00
parent 995b878a8a
commit 6bc3aba4a0
3 changed files with 6 additions and 7 deletions

View File

@ -202,7 +202,7 @@ static void handle_hci_event(uint8_t packet_type, uint16_t channel, uint8_t *pac
// we need to be paired to enable notifications
tc_state = TC_W4_ENCRYPTED_CONNECTION;
sm_send_security_request(gc_handle);
sm_request_pairing(gc_handle);
break;
default:
break;

View File

@ -4375,13 +4375,12 @@ static void sm_send_security_request_for_connection(sm_connection_t * sm_conn){
}
}
/**
* @brief Trigger Security Request
*/
// @deprecated: map onto sm_request_pairing
void sm_send_security_request(hci_con_handle_t con_handle){
sm_connection_t * sm_conn = sm_get_connection_for_handle(con_handle);
if (!sm_conn) return;
sm_send_security_request_for_connection(sm_conn);
if (!IS_RESPONDER(sm_conn->sm_role)) return;
sm_request_pairing(con_handle);
}
// request pairing

View File

@ -124,7 +124,7 @@ void sm_set_request_security(int enable);
/**
* @brief Trigger Security Request
* @note Not used normally. Bonding is triggered by access to protected attributes in ATT Server
* @deprecated please use sm_request_pairing instead
*/
void sm_send_security_request(hci_con_handle_t con_handle);
@ -161,7 +161,7 @@ void sm_passkey_input(hci_con_handle_t con_handle, uint32_t passkey);
void sm_keypress_notification(hci_con_handle_t con_handle, uint8_t action);
/**
* @brief Used by att_server.c to request user authorization.
* @brief Used by att_server.c and gatt_client.c to request user authentication
* @param con_handle
*/
void sm_request_pairing(hci_con_handle_t con_handle);