[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

[vidalia-svn] r3380: _useSavedPassword was being used uninitialized when Tor is a (vidalia/trunk/src/vidalia)



Author: edmanm
Date: 2008-12-10 23:28:01 -0500 (Wed, 10 Dec 2008)
New Revision: 3380

Modified:
   vidalia/trunk/src/vidalia/mainwindow.cpp
Log:
_useSavedPassword was being used uninitialized when Tor is already running
and the "Start Tor when Vidalia starts" checkbox is checked. Fixes ticket
#443.


Modified: vidalia/trunk/src/vidalia/mainwindow.cpp
===================================================================
--- vidalia/trunk/src/vidalia/mainwindow.cpp	2008-12-10 03:47:51 UTC (rev 3379)
+++ vidalia/trunk/src/vidalia/mainwindow.cpp	2008-12-11 04:28:01 UTC (rev 3380)
@@ -257,7 +257,14 @@
 MainWindow::running()
 {
   VidaliaSettings settings;
- 
+
+  /* Initialize _useSavedPassword to true. If Tor is already running when
+   * Vidalia starts, then there is no point in generating a random password.
+   * If Tor is not already running, then this will be set according to the
+   * current configuration in the start() method.
+   */
+  _useSavedPassword = true;
+
   if (settings.runTorAtStart()) {
     /* If we're supposed to start Tor when Vidalia starts, then do it now */
     start();