Nordic BLE: Fix return value verification

pull/7210/head
Vincent Coubard 2018-06-22 09:36:06 +01:00
parent b68e18cdb4
commit 4b8fb0be78
2 changed files with 2 additions and 2 deletions

View File

@ -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;
}

View File

@ -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;
}