Skip to content

Commit e29ea95

Browse files
committed
BLE: Return error when security deascalation is requested.
1 parent 7e2f5ee commit e29ea95

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

features/FEATURE_BLE/source/generic/GenericSecurityManager.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -383,7 +383,7 @@ ble_error_t GenericSecurityManager::setLinkEncryption(
383383

384384
if (encryption == link_encryption_t::NOT_ENCRYPTED) {
385385

386-
return _pal.disable_encryption(connection);
386+
return BLE_ERROR_INVALID_STATE;
387387

388388
} else if (encryption == link_encryption_t::ENCRYPTED) {
389389

0 commit comments

Comments
 (0)