diff options
author | Nick Mathewson <nickm@torproject.org> | 2005-12-03 16:32:29 +0000 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2005-12-03 16:32:29 +0000 |
commit | 1b0134dda8d877f8917f86cf8d3b42fa41ffb625 (patch) | |
tree | 18c1e2aecb8bb3f029af2e90a9c06d5385babeea /src/or/circuitlist.c | |
parent | 61c5a9ae2b02c5bfafc3c1aaf8ceaeadfbcee96d (diff) | |
download | tor-1b0134dda8d877f8917f86cf8d3b42fa41ffb625.tar.gz tor-1b0134dda8d877f8917f86cf8d3b42fa41ffb625.zip |
Clean up some comments; remove some dead code
svn:r5493
Diffstat (limited to 'src/or/circuitlist.c')
-rw-r--r-- | src/or/circuitlist.c | 16 |
1 files changed, 4 insertions, 12 deletions
diff --git a/src/or/circuitlist.c b/src/or/circuitlist.c index ba58c71d2a..8fceae19f6 100644 --- a/src/or/circuitlist.c +++ b/src/or/circuitlist.c @@ -132,8 +132,8 @@ circuit_set_circid_orconn(circuit_t *circ, uint16_t id, ++conn->n_circuits; } -/** Add <b>circ</b> to the list of circuits waiting for us to connect to - * an OR. */ +/** Change the state of <b>circ</b> to <b>state</b>, adding it to or removing + * it from lists as appropriate. */ void circuit_set_state(circuit_t *circ, int state) { @@ -142,9 +142,8 @@ circuit_set_state(circuit_t *circ, int state) return; if (circ->state == CIRCUIT_STATE_OR_WAIT) { /* remove from waiting-circuit list. */ - if (!circuits_pending_or_conns) - circuits_pending_or_conns = smartlist_create(); - smartlist_remove(circuits_pending_or_conns, circ); + if (circuits_pending_or_conns) + smartlist_remove(circuits_pending_or_conns, circ); } if (state == CIRCUIT_STATE_OR_WAIT) { /* add to waiting-circuit list. */ @@ -155,13 +154,6 @@ circuit_set_state(circuit_t *circ, int state) circ->state = state; } -/** Remove <b>circ</b> from the list of circuits waiting for us to connect to - * an OR. */ -void -circuit_clear_state_orwait(circuit_t *circ) -{ -} - /** Add <b>circ</b> to the global list of circuits. This is called only from * within circuit_new. */ |