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

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

Merge "le_impl: Move le_client_callbacks_ check to exit earlier"

parents 7b6d375e 77187b84
Loading
Loading
Loading
Loading
+5 −4
Original line number Diff line number Diff line
@@ -429,6 +429,11 @@ struct le_impl : public bluetooth::hci::LeAddressManagerCallback {
  }

  void create_le_connection(AddressWithType address_with_type, bool add_to_connect_list, bool is_direct) {
    if (le_client_callbacks_ == nullptr) {
      LOG_ERROR("No callbacks to call");
      return;
    }

    // TODO: Configure default LE connection parameters?
    if (add_to_connect_list) {
      add_device_to_connect_list(address_with_type);
@@ -462,10 +467,6 @@ struct le_impl : public bluetooth::hci::LeAddressManagerCallback {
      canceled_connections_.insert(address_with_type);
      return;
    }
    if (le_client_callbacks_ == nullptr) {
      LOG_ERROR("No callbacks to call");
      return;
    }

    uint16_t le_scan_interval = kScanIntervalSlow;
    uint16_t le_scan_window = kScanWindowSlow;