mirror of https://github.com/ARMmbed/mbed-os.git
Nordic BLE:
Cancel pairing if the device fail to allocate the resources necessary for the pairing operation.pull/7210/head
parent
f0c3f14887
commit
5237c3ec40
|
@ -300,6 +300,9 @@ ble_error_t nRF5xSecurityManager::send_pairing_response(
|
|||
) {
|
||||
pairing_control_block_t* pairing_cb = allocate_pairing_cb(connection);
|
||||
if (!pairing_cb) {
|
||||
// not enough memory; try to reject the pairing request instead of
|
||||
// waiting for timeout.
|
||||
cancel_pairing(connection, pairing_failure_t::UNSPECIFIED_REASON);
|
||||
return BLE_ERROR_NO_MEM;
|
||||
}
|
||||
pairing_cb->role = PAIRING_RESPONDER;
|
||||
|
|
|
@ -277,6 +277,9 @@ ble_error_t nRF5xSecurityManager::send_pairing_response(
|
|||
) {
|
||||
pairing_control_block_t* pairing_cb = allocate_pairing_cb(connection);
|
||||
if (!pairing_cb) {
|
||||
// not enough memory; try to reject the pairing request instead of
|
||||
// waiting for timeout.
|
||||
cancel_pairing(connection, pairing_failure_t::UNSPECIFIED_REASON);
|
||||
return BLE_ERROR_NO_MEM;
|
||||
}
|
||||
pairing_cb->role = PAIRING_RESPONDER;
|
||||
|
|
Loading…
Reference in New Issue