summaryrefslogtreecommitdiff
path: root/src/or/control.c
diff options
context:
space:
mode:
authorRoger Dingledine <arma@torproject.org>2005-07-17 21:13:36 +0000
committerRoger Dingledine <arma@torproject.org>2005-07-17 21:13:36 +0000
commit5643532bd9e90b45f4898d393cb1fdefd362f4a7 (patch)
treeba13f0b9339db07de9c985ddfbd7f790cb34a07a /src/or/control.c
parentfe7535c5e20fc832aaa5770d1abf6b423532bed1 (diff)
downloadtor-5643532bd9e90b45f4898d393cb1fdefd362f4a7.tar.gz
tor-5643532bd9e90b45f4898d393cb1fdefd362f4a7.zip
if the controller asks to extendcircuit to circid 0, we need to
init the circuit before we can add hops to its cpath. svn:r4586
Diffstat (limited to 'src/or/control.c')
-rw-r--r--src/or/control.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/or/control.c b/src/or/control.c
index 876c4b26a5..cdb8b8ef65 100644
--- a/src/or/control.c
+++ b/src/or/control.c
@@ -1426,6 +1426,11 @@ handle_control_extendcircuit(connection_t *conn, uint32_t len,
goto done;
}
+ if (!zero_circ) {
+ /* start a new circuit */
+ circ = circuit_init(CIRCUIT_PURPOSE_C_GENERAL, 0, 0, 0);
+ }
+
/* now circ refers to something that is ready to be extended */
SMARTLIST_FOREACH(routers, routerinfo_t *, r,
{