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

gk at torproject.org gk at torproject.org
Thu Oct 27 09:35:20 UTC 2016


commit 2014143e0081170267a34e3a102878999dee6a29
Author: Kathy Brade <brade at pearlcrescent.com>
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();



More information about the tor-commits mailing list