From 1b0134dda8d877f8917f86cf8d3b42fa41ffb625 Mon Sep 17 00:00:00 2001 From: Nick Mathewson Date: Sat, 3 Dec 2005 16:32:29 +0000 Subject: Clean up some comments; remove some dead code svn:r5493 --- src/or/circuitlist.c | 16 ++++------------ 1 file changed, 4 insertions(+), 12 deletions(-) (limited to 'src/or/circuitlist.c') 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 circ to the list of circuits waiting for us to connect to - * an OR. */ +/** Change the state of circ to state, 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 circ from the list of circuits waiting for us to connect to - * an OR. */ -void -circuit_clear_state_orwait(circuit_t *circ) -{ -} - /** Add circ to the global list of circuits. This is called only from * within circuit_new. */ -- cgit v1.2.3-54-g00ecf