apps/bttester: Fix gap pair implementation

ble_gap_security_initiate handles these
cases under the hood and more.
This commit is contained in:
Michał Narajowski
2019-03-25 12:08:21 +01:00
parent a60458bede
commit 0d51353f26
+3 -10
View File
@@ -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;