Before I create a test case to submit to bugzilla, would anyone care to tell
me I'm nuts first? :)

>From here:
https://github.com/xamarin/monotouch-samples/blob/master/ReachabilitySample/reachability.cs

public static NetworkStatus InternetConnectionStatus () {               
  NetworkReachabilityFlags flags;               
  bool defaultNetworkAvailable = IsNetworkAvaialable (out flags);               
  if (defaultNetworkAvailable){ ***
    if ((flags & NetworkReachabilityFlags.IsDirect) != 0)                       
        
      return NetworkStatus.NotReachable;                
    } else if ((flags & NetworkReachabilityFlags.IsWWAN) != 0)                  
      return NetworkStatus.ReachableViaCarrierDataNetwork;              
  return NetworkStatus.ReachableViaWiFiNetwork; 
}

Shouldn't the line marked with *** above actually be
if (!defaultNetworkAvailable)

When I go into Airplane mode, the IsNetworkAvailable call is returning
false, but that means the return code will be
NetworkStatus.ReachableViaWiFiNetwork in that case.


--
View this message in context: 
http://monotouch.2284126.n4.nabble.com/Reachability-tp4439227p4439227.html
Sent from the MonoTouch mailing list archive at Nabble.com.
_______________________________________________
MonoTouch mailing list
[email protected]
http://lists.ximian.com/mailman/listinfo/monotouch

Reply via email to