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

Commit e087e11e authored by Automerger Merge Worker's avatar Automerger Merge Worker
Browse files

Merge "gd: Register close callback prior to channel acquire" am: 64ac98cf am: 12b57bce

Change-Id: I92c62a83463c425edfd171df9e262db458f9e7bc
parents 1267c07a 12b57bce
Loading
Loading
Loading
Loading
+1 −1
Original line number Original line Diff line number Diff line
@@ -86,9 +86,9 @@ void ClassicPairingHandler::OnConnectionOpen(std::unique_ptr<l2cap::classic::Fix
  ASSERT(fixed_channel_ == nullptr);
  ASSERT(fixed_channel_ == nullptr);
  fixed_channel_ = std::move(fixed_channel);
  fixed_channel_ = std::move(fixed_channel);
  ASSERT(fixed_channel_->GetDevice() == GetRecord()->GetPseudoAddress().GetAddress());
  ASSERT(fixed_channel_->GetDevice() == GetRecord()->GetPseudoAddress().GetAddress());
  fixed_channel_->Acquire();
  fixed_channel_->RegisterOnCloseCallback(
  fixed_channel_->RegisterOnCloseCallback(
      security_handler_, common::BindOnce(&ClassicPairingHandler::OnConnectionClose, common::Unretained(this)));
      security_handler_, common::BindOnce(&ClassicPairingHandler::OnConnectionClose, common::Unretained(this)));
  fixed_channel_->Acquire();
}
}


void ClassicPairingHandler::OnConnectionFail(l2cap::classic::FixedChannelManager::ConnectionResult result) {
void ClassicPairingHandler::OnConnectionFail(l2cap::classic::FixedChannelManager::ConnectionResult result) {