From d9eadb868bc34c99379d1d38f10043c285d354f6 Mon Sep 17 00:00:00 2001 From: Swaminatha Balaji Date: Tue, 22 May 2012 03:47:15 -0700 Subject: Fix for app not getting timeout notification while SSP pairing Change-Id: I9137c1313e9e132d71f61ff571af683f8ca6728b --- stack/btm/btm_sec.c | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) (limited to 'stack/btm') diff --git a/stack/btm/btm_sec.c b/stack/btm/btm_sec.c index 80cb99f..5ef45b1 100755 --- a/stack/btm/btm_sec.c +++ b/stack/btm/btm_sec.c @@ -4608,6 +4608,25 @@ static void btm_sec_pairing_timeout (TIMER_LIST_ENT *p_tle) btm_sec_change_pairing_state (BTM_PAIR_STATE_IDLE); break; + case BTM_PAIR_STATE_WAIT_AUTH_COMPLETE: + /* We need to notify the UI that timeout has happened while waiting for authentication*/ + btm_sec_change_pairing_state (BTM_PAIR_STATE_IDLE); + if (btm_cb.api.p_auth_complete_callback) + { + if (p_dev_rec == NULL) + { + name[0] = 0; + (*btm_cb.api.p_auth_complete_callback) (p_cb->pairing_bda, + NULL, + name, HCI_ERR_CONNECTION_TOUT); + } + else + (*btm_cb.api.p_auth_complete_callback) (p_dev_rec->bd_addr, + p_dev_rec->dev_class, + p_dev_rec->sec_bd_name, HCI_ERR_CONNECTION_TOUT); + } + break; + default: BTM_TRACE_WARNING1 ("btm_sec_pairing_timeout() not processed state: %s", btm_pair_state_descr(btm_cb.pairing_state)); btm_sec_change_pairing_state (BTM_PAIR_STATE_IDLE); -- cgit v1.1