Bluetooth: SMP: Always send error if DHKey generation failed

There is no point in going with pairing any further regardless of when
bt_smp_dhkey_ready was  called.

Change-Id: I0e0c71e91ecf36f74b429d9455a2f21161939069
Signed-off-by: Szymon Janc <ext.szymon.janc@tieto.com>
This commit is contained in:
Szymon Janc 2015-11-19 12:43:19 +01:00 committed by Anas Nashif
commit 0480ecf7c4

View file

@ -1422,7 +1422,7 @@ void bt_smp_dhkey_ready(const uint8_t *dhkey)
return;
}
if (!dhkey && atomic_test_bit(&smp->flags, SMP_FLAG_DHKEY_SEND)) {
if (!dhkey) {
smp_error(smp, BT_SMP_ERR_DHKEY_CHECK_FAILED);
return;
}