From: Nick Mathewson Date: Wed, 28 Jan 2009 17:36:34 +0000 (+0000) Subject: Remove some dead code. X-Git-Tag: tor-0.2.1.12-alpha~32 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=0d5f4d4e73265a3ba5ebac341cc05dcb27c59870;p=thirdparty%2Ftor.git Remove some dead code. svn:r18301 --- diff --git a/src/or/circuitbuild.c b/src/or/circuitbuild.c index f6ffd2efdf..0aeb7686ae 100644 --- a/src/or/circuitbuild.c +++ b/src/or/circuitbuild.c @@ -331,48 +331,6 @@ circuit_establish_circuit(uint8_t purpose, extend_info_t *exit, int flags) return circ; } -#if 0 -/** Return true iff n_conn (a connection with a desired identity), is - * an acceptable choice for extending or launching a circuit to the address - * target_addr. If it is not, set state_out to a message - * describing the connection's state and our next action, and set - * launch_out to a boolean for whether we should launch a new - * connection or not. */ -int -connection_good_enough_for_extend(const or_connection_t *n_conn, - const tor_addr_t *target_addr, - const char **state_out, - int *launch_out) -{ - tor_assert(state_out); - tor_assert(launch_out); - tor_assert(target_addr); - - if (!n_conn) { - *state_out = "not connected. Connecting."; - *launch_out = 1; - return 0; - } else if (n_conn->_base.state != OR_CONN_STATE_OPEN) { - *state_out = "in progress. Waiting."; - *launch_out = 0; /* We'll just wait till the connection finishes. */ - return 0; - } else if (n_conn->is_bad_for_new_circs) { - *state_out = "too old. Launching a new one."; - *launch_out = 1; - return 0; - } else if (tor_addr_compare(&n_conn->real_addr, target_addr, CMP_EXACT) - && ! n_conn->is_canonical) { - *state_out = "is not from a canonical address. Launching a new one."; - *launch_out = 1; - return 0; - } else { - *state_out = "is fine; using it."; - *launch_out = 0; - return 1; - } -} -#endif - /** Start establishing the first hop of our circuit. Figure out what * OR we should connect to, and if necessary start the connection to * it. If we're already connected, then send the 'create' cell.