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

Commit f2e05926 authored by Chris Manton's avatar Chris Manton Committed by Automerger Merge Worker
Browse files

[1/25] bta::ag Use stack::l2cap::get_interface() am: ed3f9f82

parents b47fbab2 ed3f9f82
Loading
Loading
Loading
Loading
+4 −3
Original line number Diff line number Diff line
@@ -42,7 +42,7 @@
#include "device/include/device_iot_config.h"
#include "stack/include/bt_uuid16.h"
#include "stack/include/btm_sec_api_types.h"
#include "stack/include/l2c_api.h"
#include "stack/include/l2cap_interface.h"
#include "stack/include/port_api.h"
#include "stack/include/sdp_api.h"
#include "storage/config_keys.h"
@@ -475,7 +475,7 @@ void bta_ag_rfc_close(tBTA_AG_SCB* p_scb, const tBTA_AG_DATA& /* data */) {
    if (RFCOMM_RemoveServer(p_scb->conn_handle) != PORT_SUCCESS) {
      log::warn("Unable to remove RFCOMM server peer:{} handle:{}", p_scb->peer_addr,
                p_scb->conn_handle);
    };
    }
    bta_ag_scb_dealloc(p_scb);
  }
}
@@ -699,7 +699,8 @@ void bta_ag_rfc_data(tBTA_AG_SCB* p_scb, const tBTA_AG_DATA& /* data */) {
void bta_ag_start_close(tBTA_AG_SCB* p_scb, const tBTA_AG_DATA& data) {
  /* Take the link out of sniff and set L2C idle time to 0 */
  bta_dm_pm_active(p_scb->peer_addr);
  if (!L2CA_SetIdleTimeoutByBdAddr(p_scb->peer_addr, 0, BT_TRANSPORT_BR_EDR)) {
  if (!stack::l2cap::get_interface().L2CA_SetIdleTimeoutByBdAddr(p_scb->peer_addr, 0,
                                                                 BT_TRANSPORT_BR_EDR)) {
    log::warn("Unable to set idle timeout peer:{}", p_scb->peer_addr);
  }

+1 −0
Original line number Diff line number Diff line
@@ -266,6 +266,7 @@ cc_library_static {
        "l2cap/l2c_link.cc",
        "l2cap/l2c_main.cc",
        "l2cap/l2c_utils.cc",
        "l2cap/l2cap_api.cc",
        "metrics/stack_metrics_logging.cc",
        "rfcomm/port_api.cc",
        "rfcomm/port_rfc.cc",
+1 −0
Original line number Diff line number Diff line
@@ -151,6 +151,7 @@ source_set("stack") {
    "l2cap/l2c_link.cc",
    "l2cap/l2c_main.cc",
    "l2cap/l2c_utils.cc",
    "l2cap/l2cap_api.cc",
    "metrics/stack_metrics_logging.cc",
    "pan/pan_api.cc",
    "pan/pan_main.cc",
+2 −1
Original line number Diff line number Diff line
@@ -17,7 +17,8 @@
#include "stack/include/l2c_api.h"
#include "stack/include/l2cap_interface.h"

static bluetooth::stack::l2cap::Interface* interface_;
static bluetooth::stack::l2cap::Impl l2cap_impl;
static bluetooth::stack::l2cap::Interface* interface_ = &l2cap_impl;

bluetooth::stack::l2cap::Interface& bluetooth::stack::l2cap::get_interface() { return *interface_; }