[or-cvs] if the controller asks to extendcircuit to circid 0, we nee...

arma at seul.org arma at seul.org
Sun Jul 17 21:13:38 UTC 2005


Update of /home2/or/cvsroot/tor/src/or
In directory moria:/home/arma/work/onion/cvs/tor/src/or

Modified Files:
	control.c 
Log Message:
if the controller asks to extendcircuit to circid 0, we need to
init the circuit before we can add hops to its cpath.


Index: control.c
===================================================================
RCS file: /home2/or/cvsroot/tor/src/or/control.c,v
retrieving revision 1.104
retrieving revision 1.105
diff -u -d -r1.104 -r1.105
--- control.c	17 Jul 2005 21:06:00 -0000	1.104
+++ control.c	17 Jul 2005 21:13:36 -0000	1.105
@@ -1426,6 +1426,11 @@
     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,
   {



More information about the tor-commits mailing list