diff options
author | Venkata Jagadeesh Garaga <quic_vgaraga@quicinc.com> | 2023-04-18 13:21:47 +0530 |
---|---|---|
committer | balakrishna <quic_kunthumu@quicinc.com> | 2023-05-08 10:50:13 +0530 |
commit | f1240e64a6af102946985136b58f5ff3d3a6e376 (patch) | |
tree | 570fb7bedc26b5b192ea95243515cd3265ccea90 | |
parent | 2d2a08710f8f2c1d6a786c019fbe667475206651 (diff) |
Inquiry: Fix Race condition in inquiry cancel and discovery(1/2)
When inquiry rnr cancelled ,if RNR complete received
with in rnr cancel timeout, then stack checking
search state as idle and sending
discovery complete event.
But if pairing discovery started immediately after RNR cancel,
the seach state is discovery active.hence stack not
sending discovery complete event.
hence process rnr complete irresctive of search state if
rnr cancel timer is active
CRs-Fixed: 3467200
Change-Id: Ie44e2bad8da17959041d3533c45e7a417a307c31
-rw-r--r-- | bta/dm/bta_dm_act.cc | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/bta/dm/bta_dm_act.cc b/bta/dm/bta_dm_act.cc index 6d7b04614..4c4546210 100644 --- a/bta/dm/bta_dm_act.cc +++ b/bta/dm/bta_dm_act.cc @@ -2865,8 +2865,7 @@ static void bta_dm_rem_name_cback (const RawAddress& bd_addr, DEV_CLASS dc, BD_N /* If Discovery complete callback is pending to be given to upper layer when * cancel remote name request is called on cancelling discovery then cancel * the discovery_cb_alarm and give discovery complete callback to upper layer */ - if (bta_dm_search_cb.disc_cmpl_cb_pending && - bta_dm_search_cb.state == BTA_DM_SEARCH_IDLE) { + if (bta_dm_search_cb.disc_cmpl_cb_pending) { if (alarm_is_scheduled(bta_dm_search_cb.discovery_cb_alarm)) { APPL_TRACE_DEBUG("%s: RNR completed, cancel discovery_cb_alarm", __func__); alarm_free(bta_dm_search_cb.discovery_cb_alarm); |