[or-cvs] [torbutton/master] Potential fix for bugs 1105, 1085, 1065, 1063, and 899.

mikeperry at seul.org mikeperry at seul.org
Fri Dec 4 06:44:15 UTC 2009


Author: Mike Perry <mikeperry-git at fscked.org>
Date: Thu, 19 Nov 2009 17:57:19 -0800
Subject: Potential fix for bugs 1105, 1085, 1065, 1063, and 899.
Commit: cb8f6974c06e7f73a1dae0f66b134e5640cfdfbb

---
 src/chrome/content/preferences.js |    6 +++++-
 src/chrome/content/torbutton.js   |    5 +++++
 2 files changed, 10 insertions(+), 1 deletions(-)

diff --git a/src/chrome/content/preferences.js b/src/chrome/content/preferences.js
index 57d8c39..4ca563d 100644
--- a/src/chrome/content/preferences.js
+++ b/src/chrome/content/preferences.js
@@ -466,7 +466,8 @@ function torbutton_prefs_test_settings() {
         window.alert("Tor proxy test: HTTP error for check.torproject.org: "+ret);
         return;
     }
-            
+
+    // XXX: Localize these.
     switch(ret) {
         case 0:
             window.alert("Tor proxy test: Internal error");
@@ -494,6 +495,9 @@ function torbutton_prefs_test_settings() {
         case 7:
             window.alert("Tor proxy test: check.torproject.org returned bad result");
             break;
+        case 8:
+            window.alert("Tor proxy test: HTTP Proxy is unreachable. Is Polipo running properly?");
+            break;
     }
 }
 
diff --git a/src/chrome/content/torbutton.js b/src/chrome/content/torbutton.js
index 6a6ba30..94aab6b 100644
--- a/src/chrome/content/torbutton.js
+++ b/src/chrome/content/torbutton.js
@@ -645,6 +645,11 @@ function torbutton_test_settings() {
         // Right now the check works because we get called from the 
         // preference window. Sort of makes automatic testing a bit trickier..
         if(!wasEnabled) torbutton_disable_tor();
+        if(e.result == 0x80004005) { // NS_ERROR_FAILURE
+            torbutton_log(5,
+                    "Test failed! HTTP proxy down or request blocked!");
+            return 8;
+        }
         torbutton_log(5, "Test failed! Tor internal error: "+e);
         return 0;
     }
-- 
1.5.6.5




More information about the tor-commits mailing list