diff options
author | Nick Mathewson <nickm@torproject.org> | 2005-04-06 05:33:32 +0000 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2005-04-06 05:33:32 +0000 |
commit | b7cdcf34622eff7e2d805452e94883e8bd94f5d6 (patch) | |
tree | 0dfc4c1e18c0f15dc3f73255dbbb26d4096ff281 /src/or/circuituse.c | |
parent | 712d05c19a8730e9a34118b68d8a78f767cbb285 (diff) | |
download | tor-b7cdcf34622eff7e2d805452e94883e8bd94f5d6.tar.gz tor-b7cdcf34622eff7e2d805452e94883e8bd94f5d6.zip |
Hopefully, this will make ORs much faster, and not break them: keep a big splay tree of (circid,orconn)->circuit mappings to make circuit_get_by_circid_conn much faster.
svn:r4020
Diffstat (limited to 'src/or/circuituse.c')
-rw-r--r-- | src/or/circuituse.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/src/or/circuituse.c b/src/or/circuituse.c index 91da4ff266..756baea85a 100644 --- a/src/or/circuituse.c +++ b/src/or/circuituse.c @@ -483,10 +483,12 @@ void circuit_about_to_close_connection(connection_t *conn) { circuit_n_conn_done(conn, 0); /* Now close all the attached circuits on it. */ while ((circ = circuit_get_by_conn(conn))) { - if (circ->n_conn == conn) /* it's closing in front of us */ - circ->n_conn = NULL; - if (circ->p_conn == conn) /* it's closing behind us */ - circ->p_conn = NULL; + if (circ->n_conn == conn) + /* it's closing in front of us */ + circuit_set_circid_orconn(circ, 0, NULL, P_CONN_CHANGED); + if (circ->p_conn == conn) + /* it's closing behind us */ + circuit_set_circid_orconn(circ, 0, NULL, N_CONN_CHANGED); circuit_mark_for_close(circ); } return; |