diff options
author | Nick Mathewson <nickm@torproject.org> | 2005-12-05 19:45:54 +0000 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2005-12-05 19:45:54 +0000 |
commit | d2123388adc8af36a19446a8eee7ee64eeef90ec (patch) | |
tree | 04e61461392a05d4f56e38238c2a6e0986d1029c /src/or/circuituse.c | |
parent | fedc9c8a605b07d2c1e1c2e8b08f80c1051dbf47 (diff) | |
download | tor-d2123388adc8af36a19446a8eee7ee64eeef90ec.tar.gz tor-d2123388adc8af36a19446a8eee7ee64eeef90ec.zip |
Better fix for last bug: avoids trying to double-mark circuits.
svn:r5511
Diffstat (limited to 'src/or/circuituse.c')
-rw-r--r-- | src/or/circuituse.c | 13 |
1 files changed, 1 insertions, 12 deletions
diff --git a/src/or/circuituse.c b/src/or/circuituse.c index 4afa2f5ea3..550b6d6ded 100644 --- a/src/or/circuituse.c +++ b/src/or/circuituse.c @@ -515,21 +515,10 @@ circuit_about_to_close_connection(connection_t *conn) */ switch (conn->type) { case CONN_TYPE_OR: { - smartlist_t *circs; /* Inform any pending (not attached) circs that they should give up. */ circuit_n_conn_done(conn, 0); - circs = circuit_get_all_on_orconn(conn); /* Now close all the attached circuits on it. */ - SMARTLIST_FOREACH(circs, circuit_t *, circ, { - if (circ->n_conn == conn) - /* it's closing in front of us */ - circuit_set_circid_orconn(circ, 0, NULL, N_CONN_CHANGED); - if (circ->p_conn == conn) - /* it's closing behind us */ - circuit_set_circid_orconn(circ, 0, NULL, P_CONN_CHANGED); - circuit_mark_for_close(circ); - }); - smartlist_free(circs); + circuit_unlink_all_from_or_conn(conn); return; } case CONN_TYPE_AP: |