mirror of
https://github.com/espressif/esp-nimble.git
synced 2026-10-14 01:37:23 +00:00
apps/bttester: Fix gap pair implementation
ble_gap_security_initiate handles these cases under the hood and more.
This commit is contained in:
+3
-10
@@ -1068,16 +1068,9 @@ static void pair(const u8_t *data, u16_t len)
|
||||
goto rsp;
|
||||
}
|
||||
|
||||
if (desc.role == BLE_GAP_ROLE_SLAVE) {
|
||||
if (ble_sm_slave_initiate(desc.conn_handle)) {
|
||||
status = BTP_STATUS_FAILED;
|
||||
goto rsp;
|
||||
}
|
||||
} else {
|
||||
if (ble_sm_pair_initiate(desc.conn_handle)) {
|
||||
status = BTP_STATUS_FAILED;
|
||||
goto rsp;
|
||||
}
|
||||
if (ble_gap_security_initiate(desc.conn_handle)) {
|
||||
status = BTP_STATUS_FAILED;
|
||||
goto rsp;
|
||||
}
|
||||
|
||||
status = BTP_STATUS_SUCCESS;
|
||||
|
||||
Reference in New Issue
Block a user