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

Commit 75e99e79 authored by Chris Manton's avatar Chris Manton
Browse files

mock: [47/63] Remove BTM_RemoveScoByBdaddr

Use get_btm_client_interface() instead

Bug: 352129816
Test: m .
Flag: EXEMPT, Test infrastructure

Change-Id: If796c1b9eada5f0ed7137ac3bc6c5282d3d0745c
parent 93333103
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -96,6 +96,7 @@ struct btm_client_interface_t btm_client_interface = {
                        .BTM_CreateSco = ::BTM_CreateSco,
                        .BTM_RegForEScoEvts = ::BTM_RegForEScoEvts,
                        .BTM_RemoveSco = ::BTM_RemoveSco,
                        .BTM_RemoveScoByBdaddr = ::BTM_RemoveScoByBdaddr,
                        .BTM_WriteVoiceSettings = ::BTM_WriteVoiceSettings,
                        .BTM_EScoConnRsp = ::BTM_EScoConnRsp,
                        .BTM_GetNumScoLinks = ::BTM_GetNumScoLinks,
+1 −1
Original line number Diff line number Diff line
@@ -1177,7 +1177,7 @@ tBTM_STATUS BTM_RemoveSco(uint16_t sco_inx) {
  return BTM_CMD_STARTED;
}

void BTM_RemoveSco(const RawAddress& bda) {
void BTM_RemoveScoByBdaddr(const RawAddress& bda) {
  tSCO_CONN* p = &btm_cb.sco_cb.sco_db[0];
  uint16_t xx;

+13 −1
Original line number Diff line number Diff line
@@ -342,7 +342,19 @@ void BTM_WriteVoiceSettings(uint16_t settings);
 *
 ******************************************************************************/
[[nodiscard]] tBTM_STATUS BTM_RemoveSco(uint16_t sco_inx);
void BTM_RemoveSco(const RawAddress& bda);

/*******************************************************************************
 *
 * Function         BTM_RemoveScoByBdaddr
 *
 * Description      This function is called to remove a specific SCO connection.
 *                  but using the bluetooth device addess typically used
 *                  for ACL termination.
 *
 * Returns         void
 *
 ******************************************************************************/
void BTM_RemoveScoByBdaddr(const RawAddress& bda);

/*******************************************************************************
 *
+1 −0
Original line number Diff line number Diff line
@@ -117,6 +117,7 @@ struct btm_client_interface_t {
    [[nodiscard]] tBTM_STATUS (*BTM_RegForEScoEvts)(uint16_t sco_inx,
                                                    tBTM_ESCO_CBACK* p_esco_cback);
    [[nodiscard]] tBTM_STATUS (*BTM_RemoveSco)(uint16_t sco_inx);
    void (*BTM_RemoveScoByBdaddr)(const RawAddress& bda);
    void (*BTM_WriteVoiceSettings)(uint16_t settings);
    void (*BTM_EScoConnRsp)(uint16_t sco_inx, tHCI_STATUS hci_status, enh_esco_params_t* p_parms);
    [[nodiscard]] uint8_t (*BTM_GetNumScoLinks)();
+1 −1
Original line number Diff line number Diff line
@@ -161,7 +161,7 @@ void l2cu_release_lcb(tL2C_LCB* p_lcb) {
  p_lcb->info_resp_timer = NULL;

  if (p_lcb->transport == BT_TRANSPORT_BR_EDR) { /* Release all SCO links */
    BTM_RemoveSco(p_lcb->remote_bd_addr);
    get_btm_client_interface().sco.BTM_RemoveScoByBdaddr(p_lcb->remote_bd_addr);
  }

  if (p_lcb->sent_not_acked > 0) {
Loading