Author: chiiph Date: 2011-02-27 03:36:02 +0000 (Sun, 27 Feb 2011) New Revision: 4522
Modified: vidalia/trunk/src/vidalia/config/ServerPage.cpp Log: Ignore DirPort if setting a bridge, wrt ticket #2431.
Modified: vidalia/trunk/src/vidalia/config/ServerPage.cpp =================================================================== --- vidalia/trunk/src/vidalia/config/ServerPage.cpp 2011-02-24 14:49:11 UTC (rev 4521) +++ vidalia/trunk/src/vidalia/config/ServerPage.cpp 2011-02-27 03:36:02 UTC (rev 4522) @@ -234,6 +234,9 @@ ui.chkPublishBridgeAddress->setVisible(bridgeEnabled); ui.lblBridgeUsage->setVisible(bridgeEnabled && Vidalia::torControl()->isConnected()); + + ui.lineDirPort->setEnabled(!bridgeEnabled); + ui.chkMirrorDirectory->setEnabled(!bridgeEnabled); }
/** Returns true if the user has changed their server settings since the @@ -293,10 +296,14 @@ _settings->setPublishServerDescriptor(ui.chkPublishBridgeAddress->isChecked());
/* Save the rest of the server settings. */ - _settings->setDirectoryMirror(ui.chkMirrorDirectory->isChecked()); _settings->setNickname(ui.lineServerNickname->text()); _settings->setORPort(ui.lineServerPort->text().toUInt()); - _settings->setDirPort(ui.lineDirPort->text().toUInt()); + if (!ui.rdoBridgeMode->isChecked()) { + _settings->setDirPort(ui.lineDirPort->text().toUInt()); + _settings->setDirectoryMirror(ui.chkMirrorDirectory->isChecked()); + } else { + _settings->setDirectoryMirror(false); + } _settings->setContactInfo(ui.lineServerContact->text()); saveBandwidthLimits(); saveExitPolicies();
tor-commits@lists.torproject.org