create encryption result event even when nothing changes

pull/6188/head
paul-szczepanek-arm 2018-03-01 12:56:29 +00:00
parent f9a79bed15
commit cebc0f8fd7
1 changed files with 2 additions and 0 deletions

View File

@ -377,6 +377,7 @@ ble_error_t GenericSecurityManager::setLinkEncryption(
/* ignore if the link is already at required state*/
if (current_encryption == encryption) {
eventHandler->linkEncryptionResult(connection, current_encryption);
return BLE_ERROR_NONE;
}
@ -390,6 +391,7 @@ ble_error_t GenericSecurityManager::setLinkEncryption(
/* if already better than encrypted don't bother */
if (current_encryption == link_encryption_t::ENCRYPTED_WITH_MITM) {
eventHandler->linkEncryptionResult(connection, current_encryption);
return BLE_ERROR_NONE;
}
cb->encryption_requested = true;