From 11b2c6e50262b0f12043b0f56b83925d4f4f8c7f Mon Sep 17 00:00:00 2001 From: Wootak Jung Date: Tue, 9 May 2023 10:16:07 +0900 Subject: [PATCH] Fix authentication request cb not coming issue If you set the authentication request_cb only, cb is not called. If you don't set the req_cb, request_cb is not called. Change-Id: Ica53667f5e4d7b92708788c58e47632dcb7f827d Signed-off-by: Wootak Jung --- src/bluetooth-common.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/bluetooth-common.c b/src/bluetooth-common.c index 22e6cec..f282534 100644 --- a/src/bluetooth-common.c +++ b/src/bluetooth-common.c @@ -1538,8 +1538,12 @@ static bool __bt_need_to_handle(int event) } event_index = __bt_get_cb_index(event); - if (event_index != -1 && bt_event_slot_container[event_index].callback) + if (event_index != -1 && bt_event_slot_container[event_index].callback) { return true; + } else if (event == BLUETOOTH_EVENT_PASSKEY_CONFIRM_REQUEST && + bt_event_slot_container[BT_EVENT_AUTHENTICATION_REQUEST_NEW].callback) { + return true; + } return false; } -- 2.34.1