[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
[tor-commits] [vidalia/alpha] Make the non exit option in Sharing backward compatible with Vidalia < 0.2.14
commit aa6bfbc5c5a582866058cee961bee983cb4fbcfb
Author: Tomás Touceda <chiiph@xxxxxxxxxxxxxx>
Date: Sun Dec 25 11:28:24 2011 -0300
Make the non exit option in Sharing backward compatible with Vidalia < 0.2.14
---
changes/bug4642 | 2 ++
src/vidalia/config/ServerPage.cpp | 16 +++++++++++-----
src/vidalia/config/ServerSettings.cpp | 4 ++--
3 files changed, 15 insertions(+), 7 deletions(-)
diff --git a/changes/bug4642 b/changes/bug4642
new file mode 100644
index 0000000..0fc0b42
--- /dev/null
+++ b/changes/bug4642
@@ -0,0 +1,2 @@
+ o Make the non exit relay option backward compatible with Vidalia <
+ 0.2.14 so that it doesn't confuse users. Fixes bug 4642.
\ No newline at end of file
diff --git a/src/vidalia/config/ServerPage.cpp b/src/vidalia/config/ServerPage.cpp
index 203ce86..51514ca 100644
--- a/src/vidalia/config/ServerPage.cpp
+++ b/src/vidalia/config/ServerPage.cpp
@@ -351,11 +351,17 @@ ServerPage::load()
{
if (_settings->isBridgeEnabled())
ui.rdoBridgeMode->setChecked(true);
- else if (_settings->isNonExitEnabled())
- ui.rdoNonExitMode->setChecked(true);
- else if (_settings->isServerEnabled())
- ui.rdoServerMode->setChecked(true);
- else
+ else if (_settings->isNonExitEnabled()) {
+ if(_settings->getExitPolicy().toString() != "reject *:*")
+ ui.rdoServerMode->setChecked(true);
+ else
+ ui.rdoNonExitMode->setChecked(true);
+ } else if (_settings->isServerEnabled()) {
+ if(_settings->getExitPolicy().toString() == "reject *:*")
+ ui.rdoNonExitMode->setChecked(true);
+ else
+ ui.rdoServerMode->setChecked(true);
+ } else
ui.rdoClientMode->setChecked(true);
ui.lineServerNickname->setText(_settings->getNickname());
diff --git a/src/vidalia/config/ServerSettings.cpp b/src/vidalia/config/ServerSettings.cpp
index 76e3361..309d712 100644
--- a/src/vidalia/config/ServerSettings.cpp
+++ b/src/vidalia/config/ServerSettings.cpp
@@ -100,8 +100,8 @@ ServerSettings::confValues()
: "0"));
/* Server Exit Policy */
conf.insert(SETTING_EXITPOLICY,
- (isBridgeEnabled() ? "reject *:*"
- : localValue(SETTING_EXITPOLICY).toString()));
+ ((isBridgeEnabled() || isNonExitEnabled()) ? "reject *:*"
+ : localValue(SETTING_EXITPOLICY).toString()));
/* Server bandwidth settings */
conf.insert((torVersion >= 0x020001 ? SETTING_RELAY_BANDWIDTH_RATE
_______________________________________________
tor-commits mailing list
tor-commits@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits