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

Commit e29827b5 authored by Chienyuan's avatar Chienyuan Committed by Automerger Merge Worker
Browse files

Do not create connection when filter accept list is empty am: 22a18a85

parents eb8cbeb6 22a18a85
Loading
Loading
Loading
Loading
+5 −0
Original line number Diff line number Diff line
@@ -585,6 +585,7 @@ struct le_impl : public bluetooth::hci::LeAddressManagerCallback {
      return;
    }
    connect_list.erase(address_with_type);
    connecting_le_.erase(address_with_type);
    direct_connections_.erase(address_with_type);
    register_with_address_manager();
    le_address_manager_->RemoveDeviceFromFilterAcceptList(
@@ -643,6 +644,10 @@ struct le_impl : public bluetooth::hci::LeAddressManagerCallback {
          connectability_state_machine_text(connectability_state_).c_str());
      return;
    }
    if (connect_list.empty()) {
      LOG_ERROR("Attempting to re-arm le connection state machine when filter accept list is empty");
      return;
    }
    AddressWithType empty(Address::kEmpty, AddressType::RANDOM_DEVICE_ADDRESS);
    connectability_state_ = ConnectabilityState::ARMING;
    connecting_le_ = connect_list;