summaryrefslogtreecommitdiffstats
path: root/stack/btm
diff options
context:
space:
mode:
authorSwaminatha Balaji <swbalaji@broadcom.com>2012-05-22 03:47:15 -0700
committerMatthew Xie <mattx@google.com>2012-07-14 11:19:21 -0700
commitd9eadb868bc34c99379d1d38f10043c285d354f6 (patch)
tree9ff9088af3269cccf2875711d693bce32084276e /stack/btm
parente0dff62878a61e1b45bef41e307b1fb97eea7644 (diff)
downloadexternal_bluetooth_bluedroid-d9eadb868bc34c99379d1d38f10043c285d354f6.zip
external_bluetooth_bluedroid-d9eadb868bc34c99379d1d38f10043c285d354f6.tar.gz
external_bluetooth_bluedroid-d9eadb868bc34c99379d1d38f10043c285d354f6.tar.bz2
Fix for app not getting timeout notification while SSP pairing
Change-Id: I9137c1313e9e132d71f61ff571af683f8ca6728b
Diffstat (limited to 'stack/btm')
-rwxr-xr-xstack/btm/btm_sec.c19
1 files changed, 19 insertions, 0 deletions
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);