summaryrefslogtreecommitdiffstats
path: root/stack/smp
diff options
context:
space:
mode:
authorZhihai Xu <zhihaixu@google.com>2013-11-15 19:16:26 -0800
committerZhihai Xu <zhihaixu@google.com>2013-12-05 17:28:35 -0800
commit503a55007c7fa7769e3e03cb8d7858e32dec7ba4 (patch)
tree81a89133e9441a16da2f1904f601bddfbd5de3a5 /stack/smp
parentd3f44782195519d97589f2362e5a8879ee7b62ff (diff)
downloadandroid_system_bt-503a55007c7fa7769e3e03cb8d7858e32dec7ba4.tar.gz
android_system_bt-503a55007c7fa7769e3e03cb8d7858e32dec7ba4.tar.bz2
android_system_bt-503a55007c7fa7769e3e03cb8d7858e32dec7ba4.zip
Duplicate pair request are generated in BLE SMP.
SMP_SEC_REQUEST_EVT will trigger pair request for user permission. Due to callback event isn't cleared, duplicate pare request is generated. The fix is to clear the callback event after grant the permission for the pair request. To avoid reporting duplicae SMP_SEC_REQUEST_EVT. bug:11716879 Change-Id: I90805caa6f5360f8d64edfb711703e0e05863ea4
Diffstat (limited to 'stack/smp')
-rw-r--r--stack/smp/smp_api.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/stack/smp/smp_api.c b/stack/smp/smp_api.c
index cfde2d404..b80237697 100644
--- a/stack/smp/smp_api.c
+++ b/stack/smp/smp_api.c
@@ -204,6 +204,9 @@ void SMP_SecurityGrant(BD_ADDR bd_addr, UINT8 res)
memcmp (smp_cb.pairing_bda, bd_addr, BD_ADDR_LEN))
return;
+ /* clear the SMP_SEC_REQUEST_EVT event after get grant */
+ /* avoid generate duplicate pair request */
+ smp_cb.cb_evt = 0;
smp_sm_event(&smp_cb, SMP_API_SEC_GRANT_EVT, &res);
}