Bluetooth: Fix sending DHKey event if invalid key was provided

bt_recv should be used to send event back to stack.

Change-Id: I092e2480b3f0e5c40c0751c30be46d0310012bae
Signed-off-by: Szymon Janc <ext.szymon.janc@tieto.com>
This commit is contained in:
Szymon Janc 2016-05-25 18:00:14 +02:00
commit d7ae97de69

View file

@ -166,7 +166,7 @@ static void emulate_le_generate_dhkey(struct net_buf *buf)
if (ecc_valid_public_key(&pk) < 0) {
evt->status = 0x1f; /* unspecified error */
memset(evt->dhkey, 0, sizeof(evt->dhkey));
nano_fifo_put(&bt_dev.rx_queue, buf);
bt_recv(buf);
return;
}