mirror of https://github.com/ARMmbed/mbed-os.git
Nordic BLE: Fix return value verification
parent
b68e18cdb4
commit
4b8fb0be78
|
@ -354,7 +354,7 @@ ble_error_t nRF5xSecurityManager::cancel_pairing(
|
|||
// a pairing feature exchange from a central.
|
||||
if (!pairing_cb) {
|
||||
::Gap::Role_t current_role;
|
||||
if (!nRF5xn::Instance().getGap().get_role(connection, current_role)) {
|
||||
if (nRF5xn::Instance().getGap().get_role(connection, current_role) != BLE_ERROR_NONE) {
|
||||
return BLE_ERROR_INVALID_PARAM;
|
||||
}
|
||||
|
||||
|
|
|
@ -331,7 +331,7 @@ ble_error_t nRF5xSecurityManager::cancel_pairing(
|
|||
// a pairing feature exchange from a central.
|
||||
if (!pairing_cb) {
|
||||
::Gap::Role_t current_role;
|
||||
if (!nRF5xn::Instance().getGap().get_role(connection, current_role)) {
|
||||
if (nRF5xn::Instance().getGap().get_role(connection, current_role) != BLE_ERROR_NONE) {
|
||||
return BLE_ERROR_INVALID_PARAM;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue