[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

[tor-commits] [tor-launcher/maint-0.2.10] Bug 20429: Do not open progress window if TOR_SKIP_LAUNCH=1



commit 8aa78d3a78bbabe01759b63d837b09acdf53be42
Author: Kathy Brade <brade@xxxxxxxxxxxxxxxxx>
Date:   Wed Oct 26 15:00:06 2016 -0400

    Bug 20429: Do not open progress window if TOR_SKIP_LAUNCH=1
    
    After saving tor settings, if TOR_SKIP_LAUNCH=1 or if
    extensions.torlauncher.start_tor is false, avoid opening the progress
    dialog to monitor bootstrap progress. This avoids displaying a progress
    window that will not make progress (and the situation was made worse by
    the fact that clicking Cancel set DisableNetwork=1).
    
    Also, leave the network settings dialog open if we fail to set
    DisableNetwork=0.
---
 src/chrome/content/network-settings.js | 13 ++++++++++++-
 1 file changed, 12 insertions(+), 1 deletion(-)

diff --git a/src/chrome/content/network-settings.js b/src/chrome/content/network-settings.js
index 2736f08..dc54445 100644
--- a/src/chrome/content/network-settings.js
+++ b/src/chrome/content/network-settings.js
@@ -1055,11 +1055,22 @@ function useSettings()
 {
   var settings = {};
   settings[kTorConfKeyDisableNetwork] = false;
-  setConfAndReportErrors(settings, null);
+  let didApply = setConfAndReportErrors(settings, null);
+  if (!didApply)
+    return;
 
   gProtocolSvc.TorSendCommand("SAVECONF");
   gTorProcessService.TorClearBootstrapError();
 
+  // If we are not responsible for starting tor we do not monitor bootstrap
+  // status, so just close this dialog and return rather than opening the
+  // progress dialog (which will make no progress).
+  if (!TorLauncherUtil.shouldStartAndOwnTor)
+  {
+    close();
+    return;
+  }
+
   gIsBootstrapComplete = gTorProcessService.TorIsBootstrapDone;
   if (!gIsBootstrapComplete)
     openProgressDialog();

_______________________________________________
tor-commits mailing list
tor-commits@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits