From cd6792e5cacf5bf85bdb344bc83a66fca04e36bb Mon Sep 17 00:00:00 2001 From: Hiroshi Horie <548776+hiroshihorie@users.noreply.github.com> Date: Sat, 19 Oct 2024 16:54:56 +0900 Subject: [PATCH] Fixed issue with missing network interfaces on iOS (#151) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Related issue: https://github.com/webrtc-sdk/webrtc/issues/148 Cherry-pick : https://webrtc.googlesource.com/src/+/fea60ef8e72fb17b4f8a5363aff7e63ab8027b4f 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} Co-authored-by: Corby Hoback --- 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;