Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 5120f9b9 authored by Zhihai Xu's avatar Zhihai Xu
Browse files

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
parent b694624c
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -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);
}