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

Commit 79cb0df5 authored by Treehugger Robot's avatar Treehugger Robot Committed by Gerrit Code Review
Browse files

Merge "Make hci::AclConnection aware of AddressType for LE Connections"

parents b436f9fe d811a9ce
Loading
Loading
Loading
Loading
+4 −2
Original line number Diff line number Diff line
@@ -281,7 +281,8 @@ struct AclManager::impl {
    if (acl_connections_.size() == 1 && packet_to_send_ == nullptr) {
      start_round_robin();
    }
    std::unique_ptr<AclConnection> connection_proxy(new AclConnection(&acl_manager_, handle, address));
    std::unique_ptr<AclConnection> connection_proxy(
        new AclConnection(&acl_manager_, handle, address, peer_address_type));
    le_client_handler_->Post(common::BindOnce(&LeConnectionCallbacks::OnLeConnectSuccess,
                                              common::Unretained(le_client_callbacks_), std::move(connection_proxy)));
  }
@@ -306,7 +307,8 @@ struct AclManager::impl {
    if (acl_connections_.size() == 1 && packet_to_send_ == nullptr) {
      start_round_robin();
    }
    std::unique_ptr<AclConnection> connection_proxy(new AclConnection(&acl_manager_, handle, address));
    std::unique_ptr<AclConnection> connection_proxy(
        new AclConnection(&acl_manager_, handle, address, peer_address_type));
    le_client_handler_->Post(common::BindOnce(&LeConnectionCallbacks::OnLeConnectSuccess,
                                              common::Unretained(le_client_callbacks_), std::move(connection_proxy)));
  }
+7 −0
Original line number Diff line number Diff line
@@ -89,6 +89,10 @@ class AclConnection {
    return address_;
  }

  virtual AddressType GetAddressType() const {
    return address_type_;
  }

  uint16_t GetHandle() const {
    return handle_;
  }
@@ -139,9 +143,12 @@ class AclConnection {
  friend AclManager;
  AclConnection(AclManager* manager, uint16_t handle, Address address)
      : manager_(manager), handle_(handle), address_(address) {}
  AclConnection(AclManager* manager, uint16_t handle, Address address, AddressType address_type)
      : manager_(manager), handle_(handle), address_(address), address_type_(address_type) {}
  AclManager* manager_;
  uint16_t handle_;
  Address address_;
  AddressType address_type_;
  DISALLOW_COPY_AND_ASSIGN(AclConnection);
};