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

Commit d3c74eb4 authored by Hansong Zhang's avatar Hansong Zhang Committed by Automerger Merge Worker
Browse files

Fix L2cap LE crash am: 5b291ee4 am: afec1492

Original change: https://android-review.googlesource.com/c/platform/system/bt/+/1566909

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I93a8f3041f20a549fe73338fb4310bfb11f44e0d
parents 09c3318e afec1492
Loading
Loading
Loading
Loading
+2 −2
Original line number Original line Diff line number Diff line
@@ -130,8 +130,8 @@ void LinkManager::OnLeConnectSuccess(hci::AddressWithType connecting_address_wit
void LinkManager::OnLeConnectFail(hci::AddressWithType address_with_type, hci::ErrorCode reason) {
void LinkManager::OnLeConnectFail(hci::AddressWithType address_with_type, hci::ErrorCode reason) {
  // Notify all pending links for this device
  // Notify all pending links for this device
  auto pending_link = pending_links_.find(address_with_type);
  auto pending_link = pending_links_.find(address_with_type);
  if (pending_link == pending_links_.end() && reason != hci::ErrorCode::UNKNOWN_CONNECTION) {
  if (pending_link == pending_links_.end()) {
    // There is no pending link, exit; UNKNOWN_CONNECTION means we cancelled
    // There is no pending link, exit
    LOG_INFO("Connection to %s failed without a pending link", address_with_type.ToString().c_str());
    LOG_INFO("Connection to %s failed without a pending link", address_with_type.ToString().c_str());
    return;
    return;
  }
  }