]> git.ipfire.org Git - thirdparty/tor.git/commitdiff
Add a log message to try to track down #16013
authorNick Mathewson <nickm@torproject.org>
Thu, 11 Jun 2015 13:55:47 +0000 (09:55 -0400)
committerNick Mathewson <nickm@torproject.org>
Thu, 11 Jun 2015 13:55:47 +0000 (09:55 -0400)
src/or/circuituse.c

index a429a7d053955125171dcb8c213444f0e3f53f84..28c70ad22c580a948a34f008f4aa2d33c207f2b3 100644 (file)
@@ -1843,6 +1843,12 @@ circuit_get_open_circ_or_launch(entry_connection_t *conn,
 
   tor_assert(conn);
   tor_assert(circp);
+  if (ENTRY_TO_CONN(conn)->state != AP_CONN_STATE_CIRCUIT_WAIT) {
+    connection_t *c = ENTRY_TO_CONN(conn);
+    log_err(LD_BUG, "Connection state mismatch: wanted "
+            "AP_CONN_STATE_CIRCUIT_WAIT, but got %d (%s)",
+            c->state, conn_state_to_string(c->type, c->state));
+  }
   tor_assert(ENTRY_TO_CONN(conn)->state == AP_CONN_STATE_CIRCUIT_WAIT);
   check_exit_policy =
       conn->socks_request->command == SOCKS_COMMAND_CONNECT &&