aboutsummaryrefslogtreecommitdiff
path: root/src/or/directory.c
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2018-04-18 11:26:40 -0400
committerNick Mathewson <nickm@torproject.org>2018-04-22 15:55:09 -0400
commitff6f49f033a6fdcc63eb790548b22b9cb23d3d33 (patch)
treea8f1e934a07e21c00be13f3b46537a5241c990cd /src/or/directory.c
parent82d1d8b0711282888accc2807934f7029c28c4ef (diff)
downloadtor-ff6f49f033a6fdcc63eb790548b22b9cb23d3d33.tar.gz
tor-ff6f49f033a6fdcc63eb790548b22b9cb23d3d33.zip
Rename find_dl_schedule to find_dl_min_delay.
(We no longer need two separate functions here.)
Diffstat (limited to 'src/or/directory.c')
-rw-r--r--src/or/directory.c21
1 files changed, 7 insertions, 14 deletions
diff --git a/src/or/directory.c b/src/or/directory.c
index 7b7dc5b355..0cbf342df1 100644
--- a/src/or/directory.c
+++ b/src/or/directory.c
@@ -5300,12 +5300,17 @@ connection_dir_finished_connecting(dir_connection_t *conn)
/** Decide which download schedule we want to use based on descriptor type
* in <b>dls</b> and <b>options</b>.
- * Then return a list of int pointers defining download delays in seconds.
+ *
+ * Then, return the initial delay for that download schedule, in seconds.
+ *
* Helper function for download_status_increment_failure(),
* download_status_reset(), and download_status_increment_attempt(). */
STATIC int
-find_dl_schedule(const download_status_t *dls, const or_options_t *options)
+find_dl_min_delay(const download_status_t *dls, const or_options_t *options)
{
+ tor_assert(dls);
+ tor_assert(options);
+
switch (dls->schedule) {
case DL_SCHED_GENERIC:
/* Any other directory document */
@@ -5362,18 +5367,6 @@ find_dl_schedule(const download_status_t *dls, const or_options_t *options)
return 0;
}
-/** Decide which minimum delay step we want to use based on
- * descriptor type in <b>dls</b> and <b>options</b>.
- * Helper function for download_status_schedule_get_delay(). */
-STATIC int
-find_dl_min_delay(const download_status_t *dls, const or_options_t *options)
-{
- tor_assert(dls);
- tor_assert(options);
-
- return find_dl_schedule(dls, options);
-}
-
/** As next_random_exponential_delay() below, but does not compute a random
* value. Instead, compute the range of values that
* next_random_exponential_delay() should use when computing its random value.