[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

[or-cvs] make servers not crash when they rep-hist-note circuits tha...



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

Modified Files:
	circuit.c 
Log Message:
make servers not crash when they rep-hist-note circuits that don't start at them


Index: circuit.c
===================================================================
RCS file: /home/or/cvsroot/src/or/circuit.c,v
retrieving revision 1.154
retrieving revision 1.155
diff -u -d -r1.154 -r1.155
--- circuit.c	20 Mar 2004 09:30:30 -0000	1.154
+++ circuit.c	20 Mar 2004 20:21:20 -0000	1.155
@@ -833,6 +833,14 @@
   char *prev_nickname = NULL;
   routerinfo_t *router;
   hop = circ->cpath;
+  if(!hop) {
+    /* XXX
+     * if !hop, then we're not the beginning of this circuit.
+     * for now, just forget about it. later, we should remember when
+     * extends-through-us failed, too.
+     */
+    return;
+  }
   if (options.ORPort) {
     prev_nickname = options.Nickname;
   }