btdev: Fix not cleanup ssp_status and ssp_auto_complete
authorLuiz Augusto von Dentz <luiz.von.dentz@intel.com>
Mon, 11 Apr 2022 21:50:23 +0000 (14:50 -0700)
committerAyush Garg <ayush.garg@samsung.com>
Mon, 15 May 2023 09:25:54 +0000 (14:55 +0530)
This resets ssp_status and ssp_auto_complete flags on auth_complete.

Signed-off-by: Manika Shrivastava <manika.sh@samsung.com>
Signed-off-by: Ayush Garg <ayush.garg@samsung.com>
emulator/btdev.c

index f70fa91..ccfaed3 100755 (executable)
@@ -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,