summaryrefslogtreecommitdiffstats
path: root/stack/btm
diff options
context:
space:
mode:
authorRavi Nagarajan <nravi@broadcom.com>2012-04-13 21:13:42 +0530
committerMatthew Xie <mattx@google.com>2012-07-14 11:19:16 -0700
commitc695e84c31973382c284e85020b0bb722597563a (patch)
tree48f69afc0cca30ad32724bba9b145cb3757ef930 /stack/btm
parentc0f2a0b5fc9e71518c4d12e7c8c3a86d7c65396c (diff)
downloadexternal_bluetooth_bluedroid-c695e84c31973382c284e85020b0bb722597563a.zip
external_bluetooth_bluedroid-c695e84c31973382c284e85020b0bb722597563a.tar.gz
external_bluetooth_bluedroid-c695e84c31973382c284e85020b0bb722597563a.tar.bz2
Handle cancel bond for both legacy and ssp pairing
Change-Id: I788b170b47fb4ec1febe60444960e10df4a3f419
Diffstat (limited to 'stack/btm')
-rw-r--r--stack/btm/btm_sec.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/stack/btm/btm_sec.c b/stack/btm/btm_sec.c
index 7ccf7a0..bdf7f95 100644
--- a/stack/btm/btm_sec.c
+++ b/stack/btm/btm_sec.c
@@ -844,7 +844,10 @@ void BTM_PINCodeReply (BD_ADDR bd_addr, UINT8 res, UINT8 pin_len, UINT8 *p_pin,
if (res != BTM_SUCCESS)
{
- if (btm_cb.pairing_flags & BTM_PAIR_FLAGS_PEER_STARTED_DD)
+ /* if peer started dd OR we started dd and pre-fetch pin was not used send negative reply */
+ if ((btm_cb.pairing_flags & BTM_PAIR_FLAGS_PEER_STARTED_DD) ||
+ ((btm_cb.pairing_flags & BTM_PAIR_FLAGS_WE_STARTED_DD) &&
+ (btm_cb.pairing_flags & BTM_PAIR_FLAGS_DISC_WHEN_DONE)) )
{
/* use BTM_PAIR_STATE_WAIT_AUTH_COMPLETE to report authentication failed event */
btm_sec_change_pairing_state (BTM_PAIR_STATE_WAIT_AUTH_COMPLETE);