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

[vidalia-svn] r1863: Put in a hack to deal with Tor 0.2.0.5-alpha's spec-defying (in trunk: . src/control)



Author: edmanm
Date: 2007-08-23 14:50:23 -0400 (Thu, 23 Aug 2007)
New Revision: 1863

Modified:
   trunk/
   trunk/src/control/controlsocket.cpp
Log:
 r2046@adrastea:  edmanm | 2007-08-23 14:50:15 -0400
 Put in a hack to deal with Tor 0.2.0.5-alpha's spec-defying PROTOCOLINFO
 response.



Property changes on: trunk
___________________________________________________________________
 svk:merge ticket from /vidalia/local/trunk [r2046] on 54b3572a-7227-0410-958f-53ecd705b71a

Modified: trunk/src/control/controlsocket.cpp
===================================================================
--- trunk/src/control/controlsocket.cpp	2007-08-23 10:57:17 UTC (rev 1862)
+++ trunk/src/control/controlsocket.cpp	2007-08-23 18:50:23 UTC (rev 1863)
@@ -195,7 +195,11 @@
 
     /* If the reply line contains data, then parse out the data up until the
      * trailing CRLF "." CRLF */
-    if (c == QChar('+')) {
+    if (c == QChar('+') &&
+        !line.startsWith("250+PROTOCOLINFO")) {
+        /* XXX The second condition above is a hack to deal with Tor
+         * 0.2.0.5-alpha that gives a malformed PROTOCOLINFO reply. This
+         * should be removed once that version of Tor is sufficiently dead. */
       while (true) {
         if (!readLine(line, errmsg)) {
           return false;