From 1a1390506632d4446ae22ed5c56030c5b26e361b Mon Sep 17 00:00:00 2001 From: Luiz Augusto von Dentz Date: Mon, 11 Apr 2022 14:50:23 -0700 Subject: [PATCH] btdev: Fix not cleanup ssp_status and ssp_auto_complete This resets ssp_status and ssp_auto_complete flags on auth_complete. Signed-off-by: Manika Shrivastava Signed-off-by: Ayush Garg --- emulator/btdev.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/emulator/btdev.c b/emulator/btdev.c index f70fa91..ccfaed3 100755 --- a/emulator/btdev.c +++ b/emulator/btdev.c @@ -1366,6 +1366,11 @@ static void auth_complete(struct btdev_conn *conn, uint8_t status) ev.status = status; send_event(conn->dev, BT_HCI_EVT_AUTH_COMPLETE, &ev, sizeof(ev)); + + conn->dev->ssp_status = 0; + conn->dev->ssp_auth_complete = false; + conn->link->dev->ssp_status = 0; + conn->link->dev->ssp_auth_complete = false; } static int cmd_link_key_reply_complete(struct btdev *dev, const void *data, -- 2.7.4