From e34d46320594dbbee8eca69b44e68fc2ee1ebd58 Mon Sep 17 00:00:00 2001 From: Corby Hoback Date: Wed, 14 Aug 2024 08:40:50 -0400 Subject: [PATCH] Fixed issue with missing network interfaces on iOS MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Fixed issue with network interfaces due to a missing return value in the "nw_path_enumerate_interfaces(...)" block. Exposed in iOS 18, RTCNetworkMonitor::initWithObserver will only enumerate the first interface, instead of all device interfaces Bug: webrtc:359245764 Change-Id: Ifb9f28c33306c0096476a4afb0cdb4d734e87b2c Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/359541 Auto-Submit: Corby Commit-Queue: Jonas Oreland Reviewed-by: Kári Helgason Reviewed-by: Jonas Oreland Cr-Commit-Position: refs/heads/main@{#42818} --- AUTHORS | 1 + sdk/objc/components/network/RTCNetworkMonitor.mm | 1 + 2 files changed, 2 insertions(+) diff --git a/AUTHORS b/AUTHORS index c0c40930d6..16467a57aa 100644 --- a/AUTHORS +++ b/AUTHORS @@ -33,6 +33,7 @@ Christophe Dumez Chris Tserng Cody Barnes Colin Plumb +Corby Hoback Cyril Lashkevich CZ Theng Danail Kirov diff --git a/sdk/objc/components/network/RTCNetworkMonitor.mm b/sdk/objc/components/network/RTCNetworkMonitor.mm index 2e42ab5290..a3685e0556 100644 --- a/sdk/objc/components/network/RTCNetworkMonitor.mm +++ b/sdk/objc/components/network/RTCNetworkMonitor.mm @@ -89,6 +89,7 @@ - (instancetype)initWithObserver:(webrtc::NetworkMonitorObserver *)observer { RTCLog(@"NW path monitor available interface: %s", name); rtc::AdapterType adapterType = AdapterTypeFromInterfaceType(interfaceType); map->insert(std::pair(name, adapterType)); + return true; }); @synchronized(strongSelf) { webrtc::NetworkMonitorObserver *observer = strongSelf->_observer;