diff options
author | Roger Dingledine <arma@torproject.org> | 2010-07-20 08:07:44 -0400 |
---|---|---|
committer | Roger Dingledine <arma@torproject.org> | 2010-07-20 08:07:44 -0400 |
commit | 66d5ce266e5d9a85048255c3aee8373d0c2cf651 (patch) | |
tree | cca95ce9581c07cd62202b4be1ed009fe9f70bb0 /src/or/circuitbuild.c | |
parent | b484854525313543414e0ce0df35190bffb917b1 (diff) | |
download | tor-66d5ce266e5d9a85048255c3aee8373d0c2cf651.tar.gz tor-66d5ce266e5d9a85048255c3aee8373d0c2cf651.zip |
naked constants are bad
Diffstat (limited to 'src/or/circuitbuild.c')
-rw-r--r-- | src/or/circuitbuild.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/or/circuitbuild.c b/src/or/circuitbuild.c index 33f208a7c7..ef6751858a 100644 --- a/src/or/circuitbuild.c +++ b/src/or/circuitbuild.c @@ -2323,6 +2323,9 @@ onionskin_answer(or_circuit_t *circ, uint8_t cell_type, const char *payload, return 0; } +/** How many hops does a general-purpose circuit have by default? */ +#define DEFAULT_ROUTE_LEN 3 + /** Choose a length for a circuit of purpose <b>purpose</b>. * Default length is 3 + the number of endpoints that would give something * away. If the routerlist <b>routers</b> doesn't have enough routers @@ -2338,7 +2341,7 @@ new_route_len(uint8_t purpose, extend_info_t *exit, tor_assert(routers); - routelen = 3; + routelen = DEFAULT_ROUTE_LEN; if (exit && purpose != CIRCUIT_PURPOSE_TESTING && purpose != CIRCUIT_PURPOSE_S_ESTABLISH_INTRO) |