From 264e3be68745d2e124e4bb443596518d5639a8da Mon Sep 17 00:00:00 2001 From: Matthias Ringwald Date: Thu, 20 Aug 2015 22:00:54 +0200 Subject: [PATCH] rename sm_request_authorization to sm_request_pairing --- ble/att_server.c | 2 +- ble/sm.c | 4 ++-- ble/sm.h | 2 +- ble/sm_minimal.c | 4 ++-- test/pts/ble_central_test.c | 2 +- 5 files changed, 7 insertions(+), 7 deletions(-) diff --git a/ble/att_server.c b/ble/att_server.c index d4f701e6d..d1d32c745 100644 --- a/ble/att_server.c +++ b/ble/att_server.c @@ -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(); diff --git a/ble/sm.c b/ble/sm.c index eccde00db..8ce2cf93c 100644 --- a/ble/sm.c +++ b/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 { diff --git a/ble/sm.h b/ble/sm.h index 49cb5641b..0e45c2fd5 100644 --- a/ble/sm.h +++ b/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. diff --git a/ble/sm_minimal.c b/ble/sm_minimal.c index 72e3f0b5b..d56e7b7b9 100644 --- a/ble/sm_minimal.c +++ b/ble/sm_minimal.c @@ -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){} diff --git a/test/pts/ble_central_test.c b/test/pts/ble_central_test.c index 6a583e83e..af6da30f9 100644 --- a/test/pts/ble_central_test.c +++ b/test/pts/ble_central_test.c @@ -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;