[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
[tor-commits] [torbutton/master] Bug 4161 ctd: Really fix it this time.
commit 95edaab964434d32e2026f9f7232e3788cae894b
Author: Mike Perry <mikeperry-git@xxxxxxxxxx>
Date: Sat Oct 1 18:44:34 2011 -0700
Bug 4161 ctd: Really fix it this time.
The previous patch threw an exception, and I was testing the wrong XPI..
---
src/chrome/content/torbutton.js | 43 +++++++++++++++++++--------------------
1 files changed, 21 insertions(+), 22 deletions(-)
diff --git a/src/chrome/content/torbutton.js b/src/chrome/content/torbutton.js
index aad6f89..3150516 100644
--- a/src/chrome/content/torbutton.js
+++ b/src/chrome/content/torbutton.js
@@ -752,28 +752,6 @@ function torbutton_init_prefs() {
torprefs.setIntPref('https_port', proxy_port);
torprefs.setIntPref('ftp_port', proxy_port);
}
-
- var environ = Components.classes["@mozilla.org/process/environment;1"]
- .getService(Components.interfaces.nsIEnvironment);
-
- if (environ.exists("TOR_SOCKS_PORT")) {
- torprefs.setIntPref('socks_port', parseInt(environ.get("TOR_SOCKS_PORT")));
- if (m_tb_tbb) {
- m_tb_prefs.setIntPref('network.proxy.socks_port', parseInt(environ.get("TOR_SOCKS_PORT")));
- }
- } else {
- torprefs.setIntPref('socks_port', 9050);
- }
-
- if (environ.exists("TOR_SOCKS_HOST")) {
- torprefs.setCharPref('socks_host', environ.get("TOR_SOCKS_HOST"));
- if (m_tb_tbb) {
- m_tb_prefs.setIntPref('network.proxy.socks', parseInt(environ.get("TOR_SOCKS_HOST")));
- }
- } else {
- torprefs.setCharPref('socks_host', '127.0.0.1');
- }
-
}
torbutton_log(1, 'http_port='+torprefs.getIntPref('http_port'));
@@ -3887,6 +3865,27 @@ function torbutton_do_startup()
torbutton_new_google_cookie();
}
+ var environ = Components.classes["@mozilla.org/process/environment;1"]
+ .getService(Components.interfaces.nsIEnvironment);
+
+ if (environ.exists("TOR_SOCKS_PORT")) {
+ torprefs.setIntPref('socks_port', parseInt(environ.get("TOR_SOCKS_PORT")));
+ if (m_tb_tbb) {
+ m_tb_prefs.setIntPref('network.proxy.socks_port', parseInt(environ.get("TOR_SOCKS_PORT")));
+ }
+ } else {
+ torprefs.setIntPref('socks_port', 9050);
+ }
+
+ if (environ.exists("TOR_SOCKS_HOST")) {
+ torprefs.setCharPref('socks_host', environ.get("TOR_SOCKS_HOST"));
+ if (m_tb_tbb) {
+ m_tb_prefs.setIntPref('network.proxy.socks', parseInt(environ.get("TOR_SOCKS_HOST")));
+ }
+ } else {
+ torprefs.setCharPref('socks_host', '127.0.0.1');
+ }
+
m_tb_prefs.setBoolPref("extensions.torbutton.startup", false);
}
}
_______________________________________________
tor-commits mailing list
tor-commits@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits