aboutsummaryrefslogtreecommitdiff
path: root/src/or/circuituse.c
diff options
context:
space:
mode:
authorRoger Dingledine <arma@torproject.org>2005-11-11 19:25:30 +0000
committerRoger Dingledine <arma@torproject.org>2005-11-11 19:25:30 +0000
commit862a99749561428be6fa6e8472aac43e9824e32f (patch)
tree47c59ca5da9bfb604c4cdd1ddcbf58a2983a1312 /src/or/circuituse.c
parent4d1c6bbfc4d72684557209ce5125caf664731e3b (diff)
downloadtor-862a99749561428be6fa6e8472aac43e9824e32f.tar.gz
tor-862a99749561428be6fa6e8472aac43e9824e32f.zip
when we were cannibalizing a circuit with a particular exit
node in mind, we weren't checking to see if that exit node was already present earlier in the circuit. oops. svn:r5357
Diffstat (limited to 'src/or/circuituse.c')
-rw-r--r--src/or/circuituse.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/or/circuituse.c b/src/or/circuituse.c
index cff944a94a..a7cf6ef340 100644
--- a/src/or/circuituse.c
+++ b/src/or/circuituse.c
@@ -756,8 +756,9 @@ circuit_launch_by_extend_info(uint8_t purpose, extend_info_t *info,
if ((info || purpose != CIRCUIT_PURPOSE_C_GENERAL) &&
purpose != CIRCUIT_PURPOSE_TESTING) {
/* see if there are appropriate circs available to cannibalize. */
- if ((circ = circuit_get_clean_open(CIRCUIT_PURPOSE_C_GENERAL, need_uptime,
- need_capacity, internal))) {
+ circ = circuit_find_to_cannibalize(CIRCUIT_PURPOSE_C_GENERAL, info,
+ need_uptime, need_capacity, internal);
+ if (circ) {
info(LD_CIRC,"Cannibalizing circ '%s' for purpose %d",
build_state_get_exit_nickname(circ->build_state), purpose);
circ->purpose = purpose;
@@ -779,7 +780,7 @@ circuit_launch_by_extend_info(uint8_t purpose, extend_info_t *info,
return NULL;
break;
default:
- warn(LD_BUG, "Bug: unexpected purpose %d when cannibalizing a general circ.", purpose);
+ warn(LD_BUG, "Bug: unexpected purpose %d when cannibalizing a circ.", purpose);
tor_fragile_assert();
return NULL;
}