diff options
author | Nick Mathewson <nickm@torproject.org> | 2014-11-20 12:03:46 -0500 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2014-11-20 12:03:46 -0500 |
commit | 336c856e52d211aad6b40d29986264f3277a1327 (patch) | |
tree | f1b7930199642989c52161a1b5547e3417ede195 /src/or/circuitbuild.c | |
parent | f15cd22bb7c8f4f7009417e50a827c5bcc656807 (diff) | |
download | tor-336c856e52d211aad6b40d29986264f3277a1327.tar.gz tor-336c856e52d211aad6b40d29986264f3277a1327.zip |
Make can_complete_circuits a static variable.
Diffstat (limited to 'src/or/circuitbuild.c')
-rw-r--r-- | src/or/circuitbuild.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/or/circuitbuild.c b/src/or/circuitbuild.c index 42c4870e87..34934dc519 100644 --- a/src/or/circuitbuild.c +++ b/src/or/circuitbuild.c @@ -943,9 +943,9 @@ circuit_send_next_onion_skin(origin_circuit_t *circ) circuit_rep_hist_note_result(circ); circuit_has_opened(circ); /* do other actions as necessary */ - if (!can_complete_circuit && !circ->build_state->onehop_tunnel) { + if (!have_completed_a_circuit() && !circ->build_state->onehop_tunnel) { const or_options_t *options = get_options(); - can_complete_circuit=1; + note_that_we_completed_a_circuit(); /* FFFF Log a count of known routers here */ log_notice(LD_GENERAL, "Tor has successfully opened a circuit. " @@ -1033,7 +1033,8 @@ circuit_note_clock_jumped(int seconds_elapsed) seconds_elapsed >=0 ? "forward" : "backward"); control_event_general_status(LOG_WARN, "CLOCK_JUMPED TIME=%d", seconds_elapsed); - can_complete_circuit=0; /* so it'll log when it works again */ + /* so we log when it works again */ + note_that_we_maybe_cant_complete_circuits(); control_event_client_status(severity, "CIRCUIT_NOT_ESTABLISHED REASON=%s", "CLOCK_JUMPED"); circuit_mark_all_unused_circs(); |