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

Commit 73a9866d authored by Treehugger Robot's avatar Treehugger Robot Committed by Gerrit Code Review
Browse files

Merge changes Idfc28489,I56a62a3c,Ibfea3d22

* changes:
  Improve shim Btm::GetAddressType
  Fix stack shutdown
  GD L2cap improvements
parents 5ed2e568 41639dd1
Loading
Loading
Loading
Loading
+4 −4
Original line number Diff line number Diff line
@@ -291,6 +291,10 @@ static void event_shut_down_stack(UNUSED_ATTR void* context) {

  future_await(local_hack_future);

  main_thread_shut_down();

  module_clean_up(get_module(BTE_LOGMSG_MODULE));

  gatt_free();
  l2c_free();
  sdp_free();
@@ -305,10 +309,6 @@ static void event_shut_down_stack(UNUSED_ATTR void* context) {
    module_shut_down(get_module(BTSNOOP_MODULE));
  }

  main_thread_shut_down();

  module_clean_up(get_module(BTE_LOGMSG_MODULE));

  module_shut_down(get_module(CONTROLLER_MODULE));  // Doesn't do any work, just
                                                    // puts it in a restartable
                                                    // state
+1 −1
Original line number Diff line number Diff line
@@ -402,7 +402,7 @@ void Link::OnCentralLinkKeyComplete(hci::KeyFlag key_flag) {
  LOG_INFO("UNIMPLEMENTED key_flag:%s", hci::KeyFlagText(key_flag).c_str());
}
void Link::OnRoleChange(hci::Role new_role) {
  LOG_INFO("UNIMPLEMENTED role:%s", hci::RoleText(new_role).c_str());
  role_ = new_role;
}
void Link::OnDisconnection(hci::ErrorCode reason) {
  OnAclDisconnected(reason);
+3 −0
Original line number Diff line number Diff line
@@ -83,6 +83,9 @@ void LinkManager::ConnectFixedChannelServices(hci::Address device,

void LinkManager::ConnectDynamicChannelServices(
    hci::Address device, Link::PendingDynamicChannelConnection pending_dynamic_channel_connection, Psm psm) {
  if (!IsPsmValid(psm)) {
    return;
  }
  auto* link = GetLink(device);
  if (link == nullptr) {
    acl_manager_->CreateConnection(device);
+2 −2
Original line number Diff line number Diff line
@@ -63,6 +63,8 @@ class L2capClassicModule : public bluetooth::Module {
   */
  virtual SecurityInterface* GetSecurityInterface(os::Handler* handler, LinkSecurityInterfaceListener* listener);

  friend security::SecurityModule;

 protected:
  void ListDependencies(ModuleList* list) override;

@@ -78,8 +80,6 @@ class L2capClassicModule : public bluetooth::Module {
  struct impl;
  std::unique_ptr<impl> pimpl_;

  friend security::SecurityModule;

  DISALLOW_COPY_AND_ASSIGN(L2capClassicModule);
};

+0 −4
Original line number Diff line number Diff line
@@ -28,8 +28,6 @@ namespace l2cap {
namespace internal {

std::shared_ptr<DynamicChannelImpl> DynamicChannelAllocator::AllocateChannel(Psm psm, Cid remote_cid) {
  ASSERT_LOG(IsPsmValid(psm), "Psm 0x%x is invalid", psm);

  if (used_remote_cid_.find(remote_cid) != used_remote_cid_.end()) {
    LOG_INFO("Remote cid 0x%x is used", remote_cid);
    return nullptr;
@@ -54,8 +52,6 @@ std::shared_ptr<DynamicChannelImpl> DynamicChannelAllocator::AllocateChannel(Psm

std::shared_ptr<DynamicChannelImpl> DynamicChannelAllocator::AllocateReservedChannel(Cid reserved_cid, Psm psm,
                                                                                     Cid remote_cid) {
  ASSERT_LOG(IsPsmValid(psm), "Psm 0x%x is invalid", psm);

  if (used_remote_cid_.find(remote_cid) != used_remote_cid_.end()) {
    LOG_INFO("Remote cid 0x%x is used", remote_cid);
    return nullptr;
Loading