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/circuitbuild.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/circuitbuild.c')
-rw-r--r-- | src/or/circuitbuild.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/or/circuitbuild.c b/src/or/circuitbuild.c index 03c818ad66..8aa7549aa4 100644 --- a/src/or/circuitbuild.c +++ b/src/or/circuitbuild.c @@ -59,7 +59,7 @@ static uint16_t get_unique_circ_id_by_conn(connection_t *conn) { return 0; } test_circ_id |= high_bit; - } while (circuit_get_by_circ_id_conn(test_circ_id, conn)); + } while (circuit_get_by_circid_orconn(test_circ_id, conn)); return test_circ_id; } @@ -391,7 +391,8 @@ circuit_deliver_create_cell(circuit_t *circ, char *payload) { tor_assert(circ->n_conn->type == CONN_TYPE_OR); tor_assert(payload); - circ->n_circ_id = get_unique_circ_id_by_conn(circ->n_conn); + circuit_set_circid_orconn(circ, get_unique_circ_id_by_conn(circ->n_conn), + circ->n_conn, N_CONN_CHANGED); if (!circ->n_circ_id) { log_fn(LOG_WARN,"failed to get unique circID."); return -1; |