commit f40e5d403c143c7c2361ef3489e426351607ed31 Author: Tomás Touceda chiiph@torproject.org Date: Wed Jun 13 11:32:47 2012 -0300
Be backward compatible for DisableNetwork --- src/vidalia/MainWindow.cpp | 3 +++ src/vidalia/config/TorSettings.cpp | 6 ++++-- 2 files changed, 7 insertions(+), 2 deletions(-)
diff --git a/src/vidalia/MainWindow.cpp b/src/vidalia/MainWindow.cpp index 02a41da..73e4d41 100644 --- a/src/vidalia/MainWindow.cpp +++ b/src/vidalia/MainWindow.cpp @@ -165,6 +165,9 @@ MainWindow::~MainWindow() void MainWindow::enableNetwork() { + quint32 torVersion = Vidalia::torControl()->getTorVersion(); + if (torVersion < 0x00020309) + return; TorSettings tor_settings(_torControl); tor_settings.setDisableNetwork(false); QString errmsg; diff --git a/src/vidalia/config/TorSettings.cpp b/src/vidalia/config/TorSettings.cpp index c1dcb1a..25de975 100644 --- a/src/vidalia/config/TorSettings.cpp +++ b/src/vidalia/config/TorSettings.cpp @@ -166,8 +166,10 @@ TorSettings::apply(QString *errmsg) torrc->setValue(TOR_ARG_HASHED_PASSWORD, ""); }
- torrc->setValue(SETTING_DISABLE_NETWORK, - volatileValue(SETTING_DISABLE_NETWORK).toBool() ? "1" : "0"); + quint32 torVersion = Vidalia::torControl()->getTorVersion(); + if (torVersion >= 0x00020309) + torrc->setValue(SETTING_DISABLE_NETWORK, + volatileValue(SETTING_DISABLE_NETWORK).toBool() ? "1" : "0");
QString exitNodes = volatileValue(SETTING_EXITNODES).toString();
tor-commits@lists.torproject.org