Fix a false assertion when extending a circuit to a relay to which a connection is already established. In that case the circuit should not need to memorize extend info for that relay. circuitbuild.c:389 contains a similar assertion.

svn:r16375
This commit is contained in:
Karsten Loesing 2008-08-03 17:45:24 +00:00
parent 449174d796
commit 3c9cd463d2
3 changed files with 3 additions and 3 deletions

View File

@ -33,7 +33,7 @@ Changes in version 0.2.1.3-alpha - 2008-08-03
- Change the implementation of ExcludeNodes and ExcludeExitNodes to
be more efficient. Formerly it was quadratic in the number of
servers; now it should be linear. Fixes bug 509.
- Save 16-22 bytes per open circuit by moving the n_hop, n_port,
- Save 16-22 bytes per open circuit by moving the n_addr, n_port,
and n_conn_id_digest fields into a separate structure that's
only needed when the circuit has not yet attached to an n_conn.

View File

@ -791,7 +791,7 @@ circuit_extend(cell_t *cell, circuit_t *circ)
return 0;
}
tor_assert(circ->n_hop);
tor_assert(!circ->n_hop); /* Connection is already established. */
circ->n_conn = n_conn;
log_debug(LD_CIRC,"n_conn is %s:%u",
n_conn->_base.address,n_conn->_base.port);

View File

@ -1784,7 +1784,7 @@ typedef struct circuit_t {
circid_t n_circ_id;
/** The hop to which we want to extend this ciruit. Should be NULL if
* the */
* the circuit has attached to a connection. */
extend_info_t *n_hop;
/** True iff we are waiting for n_conn_cells to become less full before