diff options
author | Nick Mathewson <nickm@torproject.org> | 2014-03-05 14:35:07 -0500 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2014-03-05 14:35:07 -0500 |
commit | 22ccfc6b5f25f75795e5f9d554b18e717962de3e (patch) | |
tree | 044c2f7b84d34b32710d557338928ad5e45b6a65 /src/or | |
parent | 103cebd9243367106909251e73ee97aafe9d201c (diff) | |
download | tor-22ccfc6b5f25f75795e5f9d554b18e717962de3e.tar.gz tor-22ccfc6b5f25f75795e5f9d554b18e717962de3e.zip |
Rename PredictedCircsRelevanceTime->PredictedPortsRelevanceTime
All circuits are predictive; it's the ports that are expiring here.
Diffstat (limited to 'src/or')
-rw-r--r-- | src/or/config.c | 10 | ||||
-rw-r--r-- | src/or/or.h | 2 | ||||
-rw-r--r-- | src/or/rephist.c | 6 |
3 files changed, 9 insertions, 9 deletions
diff --git a/src/or/config.c b/src/or/config.c index 26fe911701..4c292d82bf 100644 --- a/src/or/config.c +++ b/src/or/config.c @@ -318,7 +318,7 @@ static config_var_t option_vars_[] = { V(NATDListenAddress, LINELIST, NULL), VPORT(NATDPort, LINELIST, NULL), V(Nickname, STRING, NULL), - V(PredictedCircsRelevanceTime, INTERVAL, "1 hour"), + V(PredictedPortsRelevanceTime, INTERVAL, "1 hour"), V(WarnUnsafeSocks, BOOL, "1"), OBSOLETE("NoPublish"), VAR("NodeFamily", LINELIST, NodeFamilies, NULL), @@ -2382,7 +2382,7 @@ compute_publishserverdescriptor(or_options_t *options) * services can overload the directory system. */ #define MIN_REND_POST_PERIOD (10*60) -/** Higest allowable value for PredictedCircsRelevanceTime; if this is +/** Higest allowable value for PredictedPortsRelevanceTime; if this is * too high, our selection of exits will decrease for an extended * period of time to an uncomfortable level .*/ #define MAX_PREDICTED_CIRCS_RELEVANCE (60*60) @@ -2847,11 +2847,11 @@ options_validate(or_options_t *old_options, or_options_t *options, options->RendPostPeriod = MAX_DIR_PERIOD; } - if (options->PredictedCircsRelevanceTime > + if (options->PredictedPortsRelevanceTime > MAX_PREDICTED_CIRCS_RELEVANCE) { - log_warn(LD_CONFIG, "PredictedCircsRelevanceTime is too large; " + log_warn(LD_CONFIG, "PredictedPortsRelevanceTime is too large; " "clipping to %ds.", MAX_PREDICTED_CIRCS_RELEVANCE); - options->PredictedCircsRelevanceTime = MAX_PREDICTED_CIRCS_RELEVANCE; + options->PredictedPortsRelevanceTime = MAX_PREDICTED_CIRCS_RELEVANCE; } if (options->Tor2webMode && options->LearnCircuitBuildTimeout) { diff --git a/src/or/or.h b/src/or/or.h index 7043e2f976..546adaa3a2 100644 --- a/src/or/or.h +++ b/src/or/or.h @@ -3638,7 +3638,7 @@ typedef struct { * a new one? */ int MaxCircuitDirtiness; /**< Never use circs that were first used more than this interval ago. */ - int PredictedCircsRelevanceTime; /** How long after we've requested a + int PredictedPortsRelevanceTime; /** How long after we've requested a * connection for a given port, do we want * to continue to pick exits that support * that port? */ diff --git a/src/or/rephist.c b/src/or/rephist.c index a65f7251f8..16e16ab651 100644 --- a/src/or/rephist.c +++ b/src/or/rephist.c @@ -1871,7 +1871,7 @@ rep_hist_get_predicted_ports(time_t now) int predicted_circs_relevance_time; smartlist_t *out = smartlist_new(); tor_assert(predicted_ports_list); - predicted_circs_relevance_time = get_options()->PredictedCircsRelevanceTime; + predicted_circs_relevance_time = get_options()->PredictedPortsRelevanceTime; /* clean out obsolete entries */ SMARTLIST_FOREACH_BEGIN(predicted_ports_list, predicted_port_t *, pp) { @@ -1943,7 +1943,7 @@ rep_hist_get_predicted_internal(time_t now, int *need_uptime, int *need_capacity) { int predicted_circs_relevance_time; - predicted_circs_relevance_time = get_options()->PredictedCircsRelevanceTime; + predicted_circs_relevance_time = get_options()->PredictedPortsRelevanceTime; if (!predicted_internal_time) { /* initialize it */ predicted_internal_time = now; @@ -1965,7 +1965,7 @@ int any_predicted_circuits(time_t now) { int predicted_circs_relevance_time; - predicted_circs_relevance_time = get_options()->PredictedCircsRelevanceTime; + predicted_circs_relevance_time = get_options()->PredictedPortsRelevanceTime; return smartlist_len(predicted_ports_list) || predicted_internal_time + predicted_circs_relevance_time >= now; |