summaryrefslogtreecommitdiffstats
path: root/stack/btm
diff options
context:
space:
mode:
authorvenkata Jagadeesh <vjagad@codeaurora.org>2015-09-02 19:25:33 +0530
committerLinux Build Service Account <lnxbuild@localhost>2015-10-06 03:22:08 -0600
commitd5685a143c9cfff5c833c5120c4f07693bdfb100 (patch)
tree979e4a890e70bbb743451995db84a011daf5bb02 /stack/btm
parentbd183f06224b4aeed3e2781f17df416d51bc718b (diff)
downloadandroid_system_bt-d5685a143c9cfff5c833c5120c4f07693bdfb100.tar.gz
android_system_bt-d5685a143c9cfff5c833c5120c4f07693bdfb100.tar.bz2
android_system_bt-d5685a143c9cfff5c833c5120c4f07693bdfb100.zip
GAP: Save pin code len for incoming legacy SAP connection
sec_flags not getting updated without pin len and stack triggering negative link key reply even linkkey is proper for 16 digit authentication of SAP Change-Id: I8300dd3ff497058291143313b169190910e0a7c5 CR-Fixed: 902405
Diffstat (limited to 'stack/btm')
-rw-r--r--stack/btm/btm_sec.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/stack/btm/btm_sec.c b/stack/btm/btm_sec.c
index a7bb42f1f..d439cfc34 100644
--- a/stack/btm/btm_sec.c
+++ b/stack/btm/btm_sec.c
@@ -1029,6 +1029,7 @@ void BTM_PINCodeReply (BD_ADDR bd_addr, UINT8 res, UINT8 pin_len, UINT8 *p_pin,
if (trusted_mask)
BTM_SEC_COPY_TRUSTED_DEVICE(trusted_mask, p_dev_rec->trusted_mask);
p_dev_rec->sec_flags |= BTM_SEC_LINK_KEY_AUTHED;
+ p_dev_rec->pin_code_length = pin_len;
if (pin_len >= 16) {
p_dev_rec->sec_flags |= BTM_SEC_16_DIGIT_PIN_AUTHED;
}
@@ -1039,7 +1040,6 @@ void BTM_PINCodeReply (BD_ADDR bd_addr, UINT8 res, UINT8 pin_len, UINT8 *p_pin,
{
/* This is start of the dedicated bonding if local device is 2.0 */
btm_cb.pin_code_len = pin_len;
- p_dev_rec->pin_code_length = pin_len;
memcpy (btm_cb.pin_code, p_pin, pin_len);
btm_cb.security_mode_changed = TRUE;