mirror of
https://github.com/bluekitchen/btstack.git
synced 2025-03-23 19:20:51 +00:00
rename sm_request_authorization to sm_request_pairing
This commit is contained in:
parent
87f8c30bce
commit
264e3be687
@ -292,7 +292,7 @@ static void att_run(void){
|
||||
switch (sm_authorization_state(att_client_addr_type, att_client_address)){
|
||||
case AUTHORIZATION_UNKNOWN:
|
||||
l2cap_release_packet_buffer();
|
||||
sm_request_authorization(att_client_addr_type, att_client_address);
|
||||
sm_request_pairing(att_client_addr_type, att_client_address);
|
||||
return;
|
||||
case AUTHORIZATION_PENDING:
|
||||
l2cap_release_packet_buffer();
|
||||
|
4
ble/sm.c
4
ble/sm.c
@ -2378,11 +2378,11 @@ void sm_send_security_request(uint16_t handle){
|
||||
}
|
||||
|
||||
// request pairing
|
||||
void sm_request_authorization(uint8_t addr_type, bd_addr_t address){
|
||||
void sm_request_pairing(uint8_t addr_type, bd_addr_t address){
|
||||
sm_connection_t * sm_conn = sm_get_connection(addr_type, address);
|
||||
if (!sm_conn) return; // wrong connection
|
||||
|
||||
log_info("sm_request_authorization in role %u, state %u", sm_conn->sm_role, sm_conn->sm_engine_state);
|
||||
log_info("sm_request_pairing in role %u, state %u", sm_conn->sm_role, sm_conn->sm_engine_state);
|
||||
if (sm_conn->sm_role){
|
||||
sm_send_security_request_for_connection(sm_conn);
|
||||
} else {
|
||||
|
2
ble/sm.h
2
ble/sm.h
@ -242,7 +242,7 @@ authorization_state_t sm_authorization_state(uint8_t addr_type, bd_addr_t addres
|
||||
* @brief Used by att_server.c to request user authorization.
|
||||
* @param addr_type and address
|
||||
*/
|
||||
void sm_request_authorization(uint8_t addr_type, bd_addr_t address);
|
||||
void sm_request_pairing(uint8_t addr_type, bd_addr_t address);
|
||||
|
||||
/**
|
||||
* @brief Report user authorization decline.
|
||||
|
@ -88,8 +88,8 @@ authorization_state_t sm_authorization_state(uint8_t addr_type, bd_addr_t addres
|
||||
return AUTHORIZATION_DECLINED;
|
||||
}
|
||||
|
||||
// request authorization
|
||||
void sm_request_authorization(uint8_t addr_type, bd_addr_t address){}
|
||||
// request pairing
|
||||
void sm_request_pairing(uint8_t addr_type, bd_addr_t address){}
|
||||
|
||||
// called by client app on authorization request
|
||||
void sm_authorization_decline(uint8_t addr_type, bd_addr_t address){}
|
||||
|
@ -582,7 +582,7 @@ int stdin_process(struct data_source *ds){
|
||||
show_usage();
|
||||
break;
|
||||
case 'b':
|
||||
sm_request_authorization(current_pts_address_type, current_pts_address);
|
||||
sm_request_pairing(current_pts_address_type, current_pts_address);
|
||||
break;
|
||||
case 'c':
|
||||
gap_connectable = 0;
|
||||
|
Loading…
x
Reference in New Issue
Block a user