Bug 480324 Link state detection on Mac OS X not always working (offline, auto detect). r=dcamp,jduell.mcbugs,sr=jst
authorMark Banner <bugzilla@standard8.plus.com>
Sat, 28 Feb 2009 09:53:45 +0000
changeset 25619 f3d5f4a980a071608ea69e724f3eacb7893e988f
parent 25618 f7f62131998dbf9c3c7f8dc1d249aabafe058792
child 25620 3e87c90e48ca02ab59b02a1f519879e8ec0ce6f4
push idunknown
push userunknown
push dateunknown
reviewersdcamp, jduell.mcbugs, jst
bugs480324
milestone1.9.2a1pre
Bug 480324 Link state detection on Mac OS X not always working (offline, auto detect). r=dcamp,jduell.mcbugs,sr=jst
netwerk/system/mac/nsNetworkLinkService.mm
--- a/netwerk/system/mac/nsNetworkLinkService.mm
+++ b/netwerk/system/mac/nsNetworkLinkService.mm
@@ -169,18 +169,17 @@ nsNetworkLinkService::Shutdown()
 void
 nsNetworkLinkService::UpdateReachability()
 {
     if (!mReachability) {
         return;
     }
 
     SCNetworkConnectionFlags flags;
-    if (!::SCNetworkReachabilityGetFlags(mReachability, &flags) ||
-        flags == 0) {
+    if (!::SCNetworkReachabilityGetFlags(mReachability, &flags)) {
         mStatusKnown = PR_FALSE;
         return;
     }
 
     PRBool reachable = (flags & kSCNetworkFlagsReachable) != 0;
     PRBool needsConnection = (flags & kSCNetworkFlagsConnectionRequired) != 0;
 
     mLinkUp = (reachable && !needsConnection);