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

[vidalia-svn] r1486: Give a better error message if we can't figure out Tor's con (trunk/src/control)



Author: edmanm
Date: 2006-12-02 15:16:10 -0500 (Sat, 02 Dec 2006)
New Revision: 1486

Modified:
   trunk/src/control/controlsocket.cpp
Log:
Give a better error message if we can't figure out Tor's control protocol
version, rather than saying "You seem to be running Version -1."


Modified: trunk/src/control/controlsocket.cpp
===================================================================
--- trunk/src/control/controlsocket.cpp	2006-12-02 01:14:00 UTC (rev 1485)
+++ trunk/src/control/controlsocket.cpp	2006-12-02 20:16:10 UTC (rev 1486)
@@ -69,11 +69,17 @@
   blockSignals(false);
   if (version != Version1) {
     disconnect();
-    return err(errmsg, tr("Vidalia only supports Version 1 of Tor's Control Protocol "
-                          "(Version %1 detected).\n"
-                          "Upgrade to a newer version of Tor.").arg(version));
+    if (version == VersionUnknown) {
+      return err(errmsg, tr("Vidalia was unable to determine Tor's control "
+                            "protocol version. Verify that your control port number "
+                            "is set correctly and you are running a recent "
+                            "version of Tor."));
+    } else {
+      return err(errmsg, tr("Vidalia only supports Version 1 of Tor's control "
+                            "protocol (version %1 detected).\n"
+                            "Upgrade to a newer version of Tor.").arg(version));
+    }
   }
-
   /* Ok, now we're really connected */
   return true;
 }