diff options
author | George Kadianakis <desnacked@riseup.net> | 2017-01-18 12:01:49 +0200 |
---|---|---|
committer | David Goulet <dgoulet@torproject.org> | 2017-04-07 09:11:09 -0400 |
commit | 037ce360bd0a7b0db1d6b6e441c90b1773b4cb06 (patch) | |
tree | 4a63e133b509033e90cd8d6f2cdd1111fd2dc0f1 /src/or/circuitlist.c | |
parent | 489ef6b38ba66f59bb6562a4702c0500478a7495 (diff) | |
download | tor-037ce360bd0a7b0db1d6b6e441c90b1773b4cb06.tar.gz tor-037ce360bd0a7b0db1d6b6e441c90b1773b4cb06.zip |
hs: Refactor circuitmap to use circuit_t instead of or_circuit_t.
Diffstat (limited to 'src/or/circuitlist.c')
-rw-r--r-- | src/or/circuitlist.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/src/or/circuitlist.c b/src/or/circuitlist.c index 738119fa18..80bb7f69f3 100644 --- a/src/or/circuitlist.c +++ b/src/or/circuitlist.c @@ -943,10 +943,6 @@ circuit_free(circuit_t *circ) crypto_cipher_free(ocirc->n_crypto); crypto_digest_free(ocirc->n_digest); - if (ocirc->hs_token) { - hs_circuitmap_remove_circuit(ocirc); - } - if (ocirc->rend_splice) { or_circuit_t *other = ocirc->rend_splice; tor_assert(other->base_.magic == OR_CIRCUIT_MAGIC); @@ -978,6 +974,11 @@ circuit_free(circuit_t *circ) /* Remove from map. */ circuit_set_n_circid_chan(circ, 0, NULL); + /* Clear HS circuitmap token from this circ (if any) */ + if (circ->hs_token) { + hs_circuitmap_remove_circuit(circ); + } + /* Clear cell queue _after_ removing it from the map. Otherwise our * "active" checks will be violated. */ cell_queue_clear(&circ->n_chan_cells); |