]> git.ipfire.org Git - thirdparty/tor.git/commitdiff
In connection_ap_handshake_process_socks(), mark the socks request as finished if...
authorFabian Keil <fk@fabiankeil.de>
Sun, 25 Sep 2011 14:32:43 +0000 (16:32 +0200)
committerNick Mathewson <nickm@torproject.org>
Wed, 16 May 2012 15:37:31 +0000 (11:37 -0400)
Silences the log message:
[warn] {BUG} _connection_mark_unattached_ap(): Bug: stream (marked at connection_edge.c:2224) sending two socks replies?
after the client triggered the "Tor is not an HTTP Proxy" response.

No additional socks reply was sent, though.

src/or/connection_edge.c

index 3b053c7cc3fbfcc5ad535e54a1c50d301cddab53..ca4bf3ffe4ca48c287dbf67eea4bc4a224cc2b25 100644 (file)
@@ -2319,6 +2319,11 @@ connection_ap_handshake_process_socks(entry_connection_t *conn)
     connection_write_to_buf((const char*)socks->reply, socks->replylen,
                             base_conn);
     socks->replylen = 0;
+    if (sockshere == -1) {
+      /* An invalid request just got a reply, no additional
+       * one is necessary. */
+      socks->has_finished = 1;
+    }
   }
 
   if (sockshere == 0) {