summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorRoger Dingledine <arma@torproject.org>2005-12-25 04:37:33 +0000
committerRoger Dingledine <arma@torproject.org>2005-12-25 04:37:33 +0000
commit40c267a89f1848243ca7dc14d6fe2015e7920b47 (patch)
tree726c043c13c345c7791ba16099c28d1f271fca9a /src
parent7e0d62b14a68f01c12b589a57d373238b2d35733 (diff)
downloadtor-40c267a89f1848243ca7dc14d6fe2015e7920b47.tar.gz
tor-40c267a89f1848243ca7dc14d6fe2015e7920b47.zip
prevent a rare infinite loop on two-byte architectures,
and be more thorough and starting over when the clock jumps. svn:r5647
Diffstat (limited to 'src')
-rw-r--r--src/or/circuitbuild.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/or/circuitbuild.c b/src/or/circuitbuild.c
index 2849a3302c..a9c169c595 100644
--- a/src/or/circuitbuild.c
+++ b/src/or/circuitbuild.c
@@ -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_elapsed)
"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