Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(434)

Unified Diff: runtime/bin/socket_patch.dart

Issue 117723003: Fix most UDP issues on Mac OS (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: runtime/bin/socket_patch.dart
diff --git a/runtime/bin/socket_patch.dart b/runtime/bin/socket_patch.dart
index 423761497e2c8e1dac11f66a15d784713a13af2a..52ff3d9273d10fa74369738a7034b1d1aba2786b 100644
--- a/runtime/bin/socket_patch.dart
+++ b/runtime/bin/socket_patch.dart
@@ -773,7 +773,7 @@ class _NativeSocket extends NativeFieldWrapperClass1 {
if (Platform.isMacOS && addr.type == InternetAddressType.IP_V4) {
if (interface != null) {
for (int i = 0; i < interface.addresses.length; i++) {
- if (addr.type == InternetAddressType.IP_V4) {
+ if (interface.addresses[i].type == InternetAddressType.IP_V4) {
return interface.addresses[i];
}
}
@@ -782,7 +782,7 @@ class _NativeSocket extends NativeFieldWrapperClass1 {
"The network interface does not have an address "
"of the same family as the multicast address");
} else {
- // Default to the ANY address if on iterface is specified.
+ // Default to the ANY address if no iterface is specified.
return InternetAddress.ANY_IP_V4;
}
} else {

Powered by Google App Engine
This is Rietveld 408576698