bug 1457005 - TRR: reset confirmation state machine on prefs update r=mcmanus
authorDaniel Stenberg <daniel@haxx.se>
Thu, 26 Apr 2018 00:07:31 +0200
changeset 471953 1936e3c9b600639a9e5ce6e5df93f64607d2ddaf
parent 471952 d8bb9fa651c6484a07d441109553d80403493aef
child 471954 dd262c337f19cc60d458d24760637c9fe2d34a2e
push id1728
push userjlund@mozilla.com
push dateMon, 18 Jun 2018 21:12:27 +0000
treeherdermozilla-release@c296fde26f5f [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersmcmanus
bugs1457005
milestone61.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
bug 1457005 - TRR: reset confirmation state machine on prefs update r=mcmanus If the confirmation state machine has gone into FAILED mode, updated prefs is reason enough to try again and possibly get TRR verified proper. MozReview-Commit-ID: ALRbNJdvxdn
netwerk/dns/TRRService.cpp
--- a/netwerk/dns/TRRService.cpp
+++ b/netwerk/dns/TRRService.cpp
@@ -267,19 +267,20 @@ TRRService::Observe(nsISupports *aSubjec
                     const char * aTopic,
                     const char16_t * aData)
 {
   MOZ_ASSERT(NS_IsMainThread(), "wrong thread");
   LOG(("TRR::Observe() topic=%s\n", aTopic));
   if (!strcmp(aTopic, NS_PREFBRANCH_PREFCHANGE_TOPIC_ID)) {
     ReadPrefs(NS_ConvertUTF16toUTF8(aData).get());
 
-    if ((mConfirmationState == CONFIRM_INIT) &&
-        !mBootstrapAddr.IsEmpty() &&
-        (mMode == MODE_TRRONLY)) {
+    if (((mConfirmationState == CONFIRM_INIT) &&
+         !mBootstrapAddr.IsEmpty() &&
+         (mMode == MODE_TRRONLY))  ||
+        (mConfirmationState == CONFIRM_FAILED)) {
       mConfirmationState = CONFIRM_TRYING;
       MaybeConfirm();
     }
 
   } else if (!strcmp(aTopic, kOpenCaptivePortalLoginEvent)) {
     // We are in a captive portal
     LOG(("TRRservice in captive portal\n"));
     mCaptiveIsPassed = false;