diff options
author | Nick Mathewson <nickm@torproject.org> | 2013-03-18 16:36:25 -0400 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2013-03-18 16:36:25 -0400 |
commit | 597cd893c557f8e05be98b6cade1b312fc6f0f8d (patch) | |
tree | e0739825eef13b029be94b06ea742d38f888aad4 /src/or/circuitlist.c | |
parent | 01407f9718a7b1eb4e43b46c2799a390551aad29 (diff) | |
parent | 7bb51fdd89feb5ea3eb7e0a0b76c0dda0e50a82e (diff) | |
download | tor-597cd893c557f8e05be98b6cade1b312fc6f0f8d.tar.gz tor-597cd893c557f8e05be98b6cade1b312fc6f0f8d.zip |
Merge remote-tracking branch 'public/bug6174' into maint-0.2.4
Diffstat (limited to 'src/or/circuitlist.c')
-rw-r--r-- | src/or/circuitlist.c | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/src/or/circuitlist.c b/src/or/circuitlist.c index d4c07fc82b..6c7629c7ba 100644 --- a/src/or/circuitlist.c +++ b/src/or/circuitlist.c @@ -1207,6 +1207,7 @@ circuit_find_to_cannibalize(uint8_t purpose, extend_info_t *info, if ((!need_uptime || circ->build_state->need_uptime) && (!need_capacity || circ->build_state->need_capacity) && (internal == circ->build_state->is_internal) && + !circ->unusable_for_new_conns && circ->remaining_relay_early_cells && circ->build_state->desired_path_len == DEFAULT_ROUTE_LEN && !circ->build_state->onehop_tunnel && @@ -1302,20 +1303,17 @@ circuit_mark_all_unused_circs(void) * This is useful for letting the user change pseudonyms, so new * streams will not be linkable to old streams. */ -/* XXX024 this is a bad name for what this function does */ void -circuit_expire_all_dirty_circs(void) +circuit_mark_all_dirty_circs_as_unusable(void) { circuit_t *circ; - const or_options_t *options = get_options(); for (circ=global_circuitlist; circ; circ = circ->next) { if (CIRCUIT_IS_ORIGIN(circ) && !circ->marked_for_close && - circ->timestamp_dirty) - /* XXXX024 This is a screwed-up way to say "This is too dirty - * for new circuits. */ - circ->timestamp_dirty -= options->MaxCircuitDirtiness; + circ->timestamp_dirty) { + mark_circuit_unusable_for_new_conns(TO_ORIGIN_CIRCUIT(circ)); + } } } |