aboutsummaryrefslogtreecommitdiff
path: root/src/core/or/circuituse.c
diff options
context:
space:
mode:
authorDavid Goulet <dgoulet@torproject.org>2019-10-31 08:06:16 -0400
committerGeorge Kadianakis <desnacked@riseup.net>2019-11-27 14:52:09 +0200
commitcbc495453cb522db1584525a06d26386f5819e05 (patch)
tree8d9352106599b54df582339e4cf0c1bf45d1df65 /src/core/or/circuituse.c
parent7f83c43594dcf13fb04352f5faa8db2cd86354c1 (diff)
downloadtor-cbc495453cb522db1584525a06d26386f5819e05.tar.gz
tor-cbc495453cb522db1584525a06d26386f5819e05.zip
hs-v3: Give a cleanup type to hs_circ_cleanup()
By centralizing the circuit cleanup type that is: on close, free and repurpose, some actions on the circuit can not happen for a certain cleanup type or for all types. This passes a cleanup type so the HS subsystem (v2 and v3) can take actions based on the type of cleanup. For instance, there is slow code that we do not run on a circuit close but rather only on free. Part of #32020 Signed-off-by: David Goulet <dgoulet@torproject.org>
Diffstat (limited to 'src/core/or/circuituse.c')
-rw-r--r--src/core/or/circuituse.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/core/or/circuituse.c b/src/core/or/circuituse.c
index 8a667024dc..ad9841cc36 100644
--- a/src/core/or/circuituse.c
+++ b/src/core/or/circuituse.c
@@ -3124,7 +3124,7 @@ circuit_change_purpose(circuit_t *circ, uint8_t new_purpose)
/* Take specific actions if we are repurposing a hidden service circuit. */
if (circuit_purpose_is_hidden_service(circ->purpose) &&
!circuit_purpose_is_hidden_service(new_purpose)) {
- hs_circ_cleanup(circ);
+ hs_circ_cleanup_on_repurpose(circ);
}
}