diff options
author | Roger Dingledine <arma@torproject.org> | 2005-08-13 00:22:07 +0000 |
---|---|---|
committer | Roger Dingledine <arma@torproject.org> | 2005-08-13 00:22:07 +0000 |
commit | 87fcd60aa29afc07ed1cfe8d5999bca63591bf52 (patch) | |
tree | 93dc45c25247d745ae8287d59f591da66c0079d6 /src/or/rephist.c | |
parent | d1c094637dee46493f2be435e2b37588bfe5331b (diff) | |
download | tor-87fcd60aa29afc07ed1cfe8d5999bca63591bf52.tar.gz tor-87fcd60aa29afc07ed1cfe8d5999bca63591bf52.zip |
predict required circuits better, with an eye toward making
hidden services faster on the service end.
svn:r4772
Diffstat (limited to 'src/or/rephist.c')
-rw-r--r-- | src/or/rephist.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/or/rephist.c b/src/or/rephist.c index f208bf95f6..e561675b98 100644 --- a/src/or/rephist.c +++ b/src/or/rephist.c @@ -748,8 +748,11 @@ rep_hist_note_used_hidserv(time_t now, int need_uptime, int need_capacity) int rep_hist_get_predicted_hidserv(time_t now, int *need_uptime, int *need_capacity) { - if (!predicted_hidserv_time) /* initialize it */ + if (!predicted_hidserv_time) { /* initialize it */ predicted_hidserv_time = now; + predicted_hidserv_uptime_time = now; + predicted_hidserv_capacity_time = now; + } if (predicted_hidserv_time + PREDICTED_CIRCS_RELEVANCE_TIME < now) return 0; /* too long ago */ if (predicted_hidserv_uptime_time + PREDICTED_CIRCS_RELEVANCE_TIME < now) |