[tor-commits] [vidalia/master] Check if autoconfiguration failed because tor died

chiiph at torproject.org chiiph at torproject.org
Fri Oct 7 19:20:38 UTC 2011


commit da4b003b22680968429c317559f9fea0dd7f2b3b
Author: Tomás Touceda <chiiph at torproject.org>
Date:   Tue Aug 30 20:05:17 2011 -0300

    Check if autoconfiguration failed because tor died
---
 src/vidalia/MainWindow.cpp |   12 +++++++++---
 1 files changed, 9 insertions(+), 3 deletions(-)

diff --git a/src/vidalia/MainWindow.cpp b/src/vidalia/MainWindow.cpp
index 4e86811..a7d43ff 100644
--- a/src/vidalia/MainWindow.cpp
+++ b/src/vidalia/MainWindow.cpp
@@ -1163,9 +1163,15 @@ MainWindow::started()
 
     if(tries >= maxtries) {
       vWarn("Couldn't read port.conf file");
-      connectFailed(QString("Vidalia can't find out how to talk to Tor because it can't access this file: %1\n\nHere's the last error message:\n %2")
-		    .arg(file.fileName())
-		    .arg(file.errorString()));
+      if(_torControl->isRunning()) {
+        connectFailed(tr("Vidalia can't find out how to talk to Tor because it can't access this file: %1\n\nHere's the last error message:\n %2")
+                      .arg(file.fileName())
+                      .arg(file.errorString()));
+      } else {
+        vWarn("Tor isn't running!");
+        connectFailed(tr("It seems Tor has stopped running since Vidalia started it.\n\nSee the Advanced Message Log for more information."));
+      }
+
       return;
     }
 





More information about the tor-commits mailing list