diff options
author | João Matos <joao@tritao.eu> | 2014-12-12 21:23:22 +0300 |
---|---|---|
committer | João Matos <joao@tritao.eu> | 2014-12-12 21:25:44 +0300 |
commit | c7593a29f882cabbe31133503a0b5943bbcb9f1d (patch) | |
tree | 00235b6cd126049a9fe4cc35b754c6e8eb017804 /mcs/class/System/System.Net.NetworkInformation/Ping.cs | |
parent | ade02c3f670a9e9d590d0a30b389c1bfe8e6796b (diff) |
[System] Fixed Ping returning invalid results on OSX.
Simplify the code by re-using the OSX check from Platform which is more robust and add some tests to make sure we don't regress.
Fixes https://bugzilla.xamarin.com/show_bug.cgi?id=25210.
Diffstat (limited to 'mcs/class/System/System.Net.NetworkInformation/Ping.cs')
-rw-r--r-- | mcs/class/System/System.Net.NetworkInformation/Ping.cs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/mcs/class/System/System.Net.NetworkInformation/Ping.cs b/mcs/class/System/System.Net.NetworkInformation/Ping.cs index 1299b60798b..246c8967623 100644 --- a/mcs/class/System/System.Net.NetworkInformation/Ping.cs +++ b/mcs/class/System/System.Net.NetworkInformation/Ping.cs @@ -534,7 +534,7 @@ namespace System.Net.NetworkInformation { CultureInfo culture = CultureInfo.InvariantCulture; StringBuilder args = new StringBuilder (); uint t = Convert.ToUInt32 (Math.Floor ((timeout + 1000) / 1000.0)); - bool is_mac = ((int) Environment.OSVersion.Platform == 6); + bool is_mac = Platform.IsMacOS; if (!is_mac) args.AppendFormat (culture, "-q -n -c {0} -w {1} -t {2} -M ", DefaultCount, t, options.Ttl); else |