File tree Expand file tree Collapse file tree 2 files changed +6
-0
lines changed
features/FEATURE_BLE/targets/TARGET_NORDIC Expand file tree Collapse file tree 2 files changed +6
-0
lines changed Original file line number Diff line number Diff line change @@ -300,6 +300,9 @@ ble_error_t nRF5xSecurityManager::send_pairing_response(
300
300
) {
301
301
pairing_control_block_t * pairing_cb = allocate_pairing_cb (connection);
302
302
if (!pairing_cb) {
303
+ // not enough memory; try to reject the pairing request instead of
304
+ // waiting for timeout.
305
+ cancel_pairing (connection, pairing_failure_t ::UNSPECIFIED_REASON);
303
306
return BLE_ERROR_NO_MEM;
304
307
}
305
308
pairing_cb->role = PAIRING_RESPONDER;
Original file line number Diff line number Diff line change @@ -277,6 +277,9 @@ ble_error_t nRF5xSecurityManager::send_pairing_response(
277
277
) {
278
278
pairing_control_block_t * pairing_cb = allocate_pairing_cb (connection);
279
279
if (!pairing_cb) {
280
+ // not enough memory; try to reject the pairing request instead of
281
+ // waiting for timeout.
282
+ cancel_pairing (connection, pairing_failure_t ::UNSPECIFIED_REASON);
280
283
return BLE_ERROR_NO_MEM;
281
284
}
282
285
pairing_cb->role = PAIRING_RESPONDER;
You can’t perform that action at this time.
0 commit comments