mirror of
https://gitlab.torproject.org/tpo/core/tor.git
synced 2024-11-11 05:33:47 +01:00
ok, ok, maybe *this* time my rep_hist_circbuilding_dormant() will work.
svn:r6568
This commit is contained in:
parent
18eb8192db
commit
bb18168fae
@ -2105,7 +2105,7 @@ void rep_hist_note_used_internal(time_t now, int need_uptime,
|
||||
int rep_hist_get_predicted_internal(time_t now, int *need_uptime,
|
||||
int *need_capacity);
|
||||
|
||||
int rep_hist_circbuilding_dormant(void);
|
||||
int rep_hist_circbuilding_dormant(time_t now);
|
||||
|
||||
void rep_hist_free_all(void);
|
||||
|
||||
|
@ -916,11 +916,12 @@ rep_hist_get_predicted_internal(time_t now, int *need_uptime,
|
||||
|
||||
/** Return 1 if we have no need for circuits currently, else return 0. */
|
||||
int
|
||||
rep_hist_circbuilding_dormant(void)
|
||||
rep_hist_circbuilding_dormant(time_t now)
|
||||
{
|
||||
/* Any ports used lately? These are pre-seeded if we just started
|
||||
* up or if we're running a hidden service. */
|
||||
if (smartlist_len(predicted_ports_list) || predicted_internal_time)
|
||||
if (smartlist_len(predicted_ports_list) ||
|
||||
predicted_internal_time + PREDICTED_CIRCS_RELEVANCE_TIME >= now)
|
||||
return 0;
|
||||
|
||||
/* see if we'll still need to build testing circuits */
|
||||
|
@ -3436,7 +3436,7 @@ update_router_descriptor_client_downloads(time_t now)
|
||||
"Called router_descriptor_client_downloads() on a dir mirror?");
|
||||
}
|
||||
|
||||
if (rep_hist_circbuilding_dormant()) {
|
||||
if (rep_hist_circbuilding_dormant(now)) {
|
||||
log_info(LD_CIRC, "Skipping descriptor downloads: we haven't needed "
|
||||
"any circuits lately.");
|
||||
return;
|
||||
|
Loading…
Reference in New Issue
Block a user