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

Commit 96f1177b authored by Zach Johnson's avatar Zach Johnson
Browse files

bta_dm_inq_cmpl can only happen in the active state

no need to send a message, just do the thing

Bug: 159815595
Tag: #refactor
Test: compile & verify basic functions working
Change-Id: I3aa56e4c7a8824f0d10aff6fcde51ca3420ae73e
parent df4a008d
Loading
Loading
Loading
Loading
+2 −6
Original line number Diff line number Diff line
@@ -970,14 +970,10 @@ void bta_dm_inq_cmpl(uint8_t num) {
    bta_dm_discover_device(
        bta_dm_search_cb.p_btm_inq_info->results.remote_bd_addr);
  } else {
    tBTA_DM_MSG* p_msg = (tBTA_DM_MSG*)osi_malloc(sizeof(tBTA_DM_MSG));

    /* no devices, search complete */
    bta_dm_search_cb.services = 0;

    p_msg->hdr.event = BTA_DM_SEARCH_CMPL_EVT;
    p_msg->hdr.layer_specific = BTA_DM_API_DISCOVER_EVT;
    bta_sys_sendmsg(p_msg);
    bta_dm_search_set_state(BTA_DM_SEARCH_IDLE);
    bta_dm_search_cmpl();
  }
}