]> git.ipfire.org Git - thirdparty/tor.git/commitdiff
make servers not crash when they rep-hist-note circuits that don't start at them
authorRoger Dingledine <arma@torproject.org>
Sat, 20 Mar 2004 20:21:20 +0000 (20:21 +0000)
committerRoger Dingledine <arma@torproject.org>
Sat, 20 Mar 2004 20:21:20 +0000 (20:21 +0000)
svn:r1317

src/or/circuit.c

index 9c07532ff2fd0ed0efe5cef57ff664c418c3fdc8..45b10ee252439ab04dac95266415132571a74328 100644 (file)
@@ -833,6 +833,14 @@ circuit_rep_hist_note_result(circuit_t *circ)
   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;
   }