summaryrefslogtreecommitdiff
path: root/stack/smp
diff options
context:
space:
mode:
authorZhihai Xu <zhihaixu@google.com>2013-12-06 01:32:48 +0000
committerAndroid (Google) Code Review <android-gerrit@google.com>2013-12-06 01:32:48 +0000
commit9d6b33774054e540ff5365510faf5cfbad0dc739 (patch)
tree36a2dde1c96f8fe3627749e1943ceb2635fb1075 /stack/smp
parent28b978c9f09a8e5eff4185e20a7409c8c95d33cc (diff)
parent58440603564a1f43ef27b3bf738d9d6177b7b9ee (diff)
downloadbluedroid-9d6b33774054e540ff5365510faf5cfbad0dc739.tar.gz
Merge "BLE Secuity manager state machine generate wrong pairing success event."
Diffstat (limited to 'stack/smp')
-rw-r--r--stack/smp/smp_act.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/stack/smp/smp_act.c b/stack/smp/smp_act.c
index 032f3ed..babd300 100644
--- a/stack/smp/smp_act.c
+++ b/stack/smp/smp_act.c
@@ -905,10 +905,9 @@ void smp_delay_terminate(tSMP_CB *p_cb, tSMP_INT_DATA *p_data)
btu_stop_timer (&p_cb->rsp_timer_ent);
- /* if remote user terminate connection, finish SMP pairing as normal */
- if (p_data->reason == HCI_ERR_PEER_USER)
- p_cb->status = SMP_SUCCESS;
- else
+ /* if remote user terminate connection, keep the previous status */
+ /* this is to avoid reporting reverse status to uplayer */
+ if (p_data->reason != HCI_ERR_PEER_USER)
p_cb->status = SMP_CONN_TOUT;
smp_proc_pairing_cmpl(p_cb);