From 5643532bd9e90b45f4898d393cb1fdefd362f4a7 Mon Sep 17 00:00:00 2001 From: Roger Dingledine Date: Sun, 17 Jul 2005 21:13:36 +0000 Subject: [PATCH] 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 --- src/or/control.c | 5 +++++ 1 file changed, 5 insertions(+) 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, {