Skip to content

Commit cebc0f8

Browse files
create encryption result event even when nothing changes
1 parent f9a79be commit cebc0f8

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

features/FEATURE_BLE/source/generic/GenericSecurityManager.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -377,6 +377,7 @@ ble_error_t GenericSecurityManager::setLinkEncryption(
377377

378378
/* ignore if the link is already at required state*/
379379
if (current_encryption == encryption) {
380+
eventHandler->linkEncryptionResult(connection, current_encryption);
380381
return BLE_ERROR_NONE;
381382
}
382383

@@ -390,6 +391,7 @@ ble_error_t GenericSecurityManager::setLinkEncryption(
390391

391392
/* if already better than encrypted don't bother */
392393
if (current_encryption == link_encryption_t::ENCRYPTED_WITH_MITM) {
394+
eventHandler->linkEncryptionResult(connection, current_encryption);
393395
return BLE_ERROR_NONE;
394396
}
395397
cb->encryption_requested = true;

0 commit comments

Comments
 (0)