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

Commit 78295f23 authored by Treehugger Robot's avatar Treehugger Robot Committed by Gerrit Code Review
Browse files

Merge "SM: Refine channel connect logic"

parents faa510ff 6973eeb3
Loading
Loading
Loading
Loading
+4 −1
Original line number Diff line number Diff line
@@ -41,8 +41,11 @@ SecurityManagerChannel::~SecurityManagerChannel() {

void SecurityManagerChannel::Connect(hci::Address address) {
  ASSERT_LOG(l2cap_security_interface_ != nullptr, "L2cap Security Interface is null!");
  if (link_map_.find(address) != link_map_.end()) {
  auto entry = link_map_.find(address);
  if (entry != link_map_.end()) {
    LOG_WARN("Already connected to '%s'", address.ToString().c_str());
    entry->second->Hold();
    entry->second->EnsureAuthenticated();
    return;
  }
  l2cap_security_interface_->InitiateConnectionForSecurity(address);