[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
[vidalia-svn] r3395: If Tor is running and has established a circuit when it's ti (vidalia/branches/auto-updates/src/vidalia)
Author: edmanm
Date: 2008-12-13 02:46:40 -0500 (Sat, 13 Dec 2008)
New Revision: 3395
Modified:
vidalia/branches/auto-updates/src/vidalia/mainwindow.cpp
Log:
If Tor is running and has established a circuit when it's time to check
for an update (or the user forces a check), then use Tor to check for
and download any available updates. Otherwise, still check for updates
but do it without Tor.
Modified: vidalia/branches/auto-updates/src/vidalia/mainwindow.cpp
===================================================================
--- vidalia/branches/auto-updates/src/vidalia/mainwindow.cpp 2008-12-13 07:45:00 UTC (rev 3394)
+++ vidalia/branches/auto-updates/src/vidalia/mainwindow.cpp 2008-12-13 07:46:40 UTC (rev 3395)
@@ -1521,12 +1521,20 @@
{
VidaliaSettings settings;
- if (_updateProcess.isRunning() && showProgress) {
- /* A check for updates is already in progress, so just bring the update
- * progress dialog into focus.
- */
- _updateProgressDialog.show();
+ if (_updateProcess.isRunning()) {
+ if (showProgress) {
+ /* A check for updates is already in progress, so just bring the update
+ * progress dialog into focus.
+ */
+ _updateProgressDialog.show();
+ }
} else {
+ /* If Tor is running and bootstrapped, then use Tor to check for updates */
+ if (_torControl->isRunning() && _torControl->circuitEstablished())
+ _updateProcess.setSocksPort(_torControl->getSocksPort());
+ else
+ _updateProcess.setSocksPort(0);
+
/* Initialize the UpdateProgressDialog and display it, if necessary. */
_updateProgressDialog.setStatus(UpdateProgressDialog::CheckingForUpdates);
if (showProgress)