Bug 1334520 - Trigger captive portal recheck recheck for NS_NETWORK_LINK_DATA_CHANGED events r=mcmanus a=jcristau
authorValentin Gosu <valentin.gosu@gmail.com>
Mon, 30 Jan 2017 13:16:05 +0100
changeset 480364 35b9c31fbd27ef69f59d41c930040053b2240430
parent 480363 cfa727a93b0bd874cf02dd6fd58c0a0353b52105
child 480365 cb083bb2dd7d75721602bb2768f6f8e096d910f4
push id44524
push usermartin.thomson@gmail.com
push dateWed, 08 Feb 2017 05:10:11 +0000
reviewersmcmanus, jcristau
bugs1334520
milestone52.0
Bug 1334520 - Trigger captive portal recheck recheck for NS_NETWORK_LINK_DATA_CHANGED events r=mcmanus a=jcristau MozReview-Commit-ID: L8XBLx88PbS
netwerk/base/nsIOService.cpp
--- a/netwerk/base/nsIOService.cpp
+++ b/netwerk/base/nsIOService.cpp
@@ -1617,16 +1617,18 @@ nsIOService::OnNetworkLinkEvent(const ch
         LOG(("nsIOService::OnNetworkLinkEvent mManageLinkStatus=false\n"));
         return NS_OK;
     }
 
     bool isUp = true;
     if (!strcmp(data, NS_NETWORK_LINK_DATA_CHANGED)) {
         mLastNetworkLinkChange = PR_IntervalNow();
         // CHANGED means UP/DOWN didn't change
+        // but the status of the captive portal may have changed.
+        RecheckCaptivePortal();
         return NS_OK;
     } else if (!strcmp(data, NS_NETWORK_LINK_DATA_DOWN)) {
         isUp = false;
     } else if (!strcmp(data, NS_NETWORK_LINK_DATA_UP)) {
         isUp = true;
     } else if (!strcmp(data, NS_NETWORK_LINK_DATA_UNKNOWN)) {
         nsresult rv = mNetworkLinkService->GetIsLinkUp(&isUp);
         NS_ENSURE_SUCCESS(rv, rv);