[or-cvs] prevent a rare infinite loop on two-byte architectures,

arma at seul.org arma at seul.org
Sun Dec 25 04:37:35 UTC 2005


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

Modified Files:
	circuitbuild.c 
Log Message:
prevent a rare infinite loop on two-byte architectures,
and be more thorough and starting over when the clock jumps.


Index: circuitbuild.c
===================================================================
RCS file: /home2/or/cvsroot/tor/src/or/circuitbuild.c,v
retrieving revision 1.186
retrieving revision 1.187
diff -u -p -d -r1.186 -r1.187
--- circuitbuild.c	24 Dec 2005 23:39:20 -0000	1.186
+++ circuitbuild.c	25 Dec 2005 04:37:33 -0000	1.187
@@ -65,7 +65,7 @@ static uint16_t
 get_unique_circ_id_by_conn(connection_t *conn)
 {
   uint16_t test_circ_id;
-  int attempts=0;
+  uint16_t attempts=0;
   uint16_t high_bit;
 
   tor_assert(conn);
@@ -651,6 +651,7 @@ circuit_note_clock_jumped(int seconds_el
       "assuming established circuits no longer work.", seconds_elapsed);
   has_completed_circuit=0; /* so it'll log when it works again */
   circuit_mark_all_unused_circs();
+  circuit_expire_all_dirty_circs();
 }
 
 /** Take the 'extend' cell, pull out addr/port plus the onion skin. Make



More information about the tor-commits mailing list