diff --git a/internal/platform/implementation/linux/platform.cc b/internal/platform/implementation/linux/platform.cc index 9e22395b..56648a1c 100644 --- a/internal/platform/implementation/linux/platform.cc +++ b/internal/platform/implementation/linux/platform.cc @@ -190,9 +190,9 @@ ImplementationPlatform::CreateBluetoothAdapter() { std::unique_ptr ImplementationPlatform::CreateBluetoothClassicMedium( BluetoothAdapter &adapter) { - auto path = static_cast(&adapter)->GetObjectPath(); return std::make_unique( - linux::getSystemBusConnection(), path); + linux::getSystemBusConnection(), + dynamic_cast(adapter)); } std::unique_ptr ImplementationPlatform::CreateBleMedium( @@ -205,6 +205,7 @@ ImplementationPlatform::CreateBleV2Medium(api::BluetoothAdapter &adapter) { return std::make_unique(); } +namespace { static std::unique_ptr createWifiMedium( std::shared_ptr nm) { std::vector device_paths; @@ -246,6 +247,7 @@ static std::unique_ptr createWifiMedium( << ": couldn't find a wireless device on this system"; return nullptr; } +} // namespace std::unique_ptr ImplementationPlatform::CreateWifiMedium() { auto nm =