summaryrefslogtreecommitdiff
path: root/src/or/scheduler_kist.c
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2018-02-01 08:13:35 -0500
committerNick Mathewson <nickm@torproject.org>2018-02-01 08:15:09 -0500
commitca85d6621758269f7a94fbec22efa7f9d205c628 (patch)
tree8a6f410e046ee159d2f3fb26b5a4a281fe8e9f2a /src/or/scheduler_kist.c
parentd1c2597096cac27eb9ee842f52384ca4cb28a195 (diff)
parent61cb2993ddb39d72bb312c6904414151d71e0577 (diff)
downloadtor-ca85d6621758269f7a94fbec22efa7f9d205c628.tar.gz
tor-ca85d6621758269f7a94fbec22efa7f9d205c628.zip
Merge branch 'maint-0.3.2'
Diffstat (limited to 'src/or/scheduler_kist.c')
-rw-r--r--src/or/scheduler_kist.c20
1 files changed, 8 insertions, 12 deletions
diff --git a/src/or/scheduler_kist.c b/src/or/scheduler_kist.c
index 246c73009a..424ef05906 100644
--- a/src/or/scheduler_kist.c
+++ b/src/or/scheduler_kist.c
@@ -362,10 +362,10 @@ outbuf_table_remove(outbuf_table_t *table, channel_t *chan)
/* Set the scheduler running interval. */
static void
-set_scheduler_run_interval(const networkstatus_t *ns)
+set_scheduler_run_interval(void)
{
int old_sched_run_interval = sched_run_interval;
- sched_run_interval = kist_scheduler_run_interval(ns);
+ sched_run_interval = kist_scheduler_run_interval();
if (old_sched_run_interval != sched_run_interval) {
log_info(LD_SCHED, "Scheduler KIST changing its running interval "
"from %" PRId32 " to %" PRId32,
@@ -481,13 +481,9 @@ kist_on_channel_free_fn(const channel_t *chan)
/* Function of the scheduler interface: on_new_consensus() */
static void
-kist_scheduler_on_new_consensus(const networkstatus_t *old_c,
- const networkstatus_t *new_c)
+kist_scheduler_on_new_consensus(void)
{
- (void) old_c;
- (void) new_c;
-
- set_scheduler_run_interval(new_c);
+ set_scheduler_run_interval();
}
/* Function of the scheduler interface: on_new_options() */
@@ -497,7 +493,7 @@ kist_scheduler_on_new_options(void)
sock_buf_size_factor = get_options()->KISTSockBufSizeFactor;
/* Calls kist_scheduler_run_interval which calls get_options(). */
- set_scheduler_run_interval(NULL);
+ set_scheduler_run_interval();
}
/* Function of the scheduler interface: init() */
@@ -764,7 +760,7 @@ get_kist_scheduler(void)
* - If consensus doesn't say anything, return 10 milliseconds, default.
*/
int
-kist_scheduler_run_interval(const networkstatus_t *ns)
+kist_scheduler_run_interval(void)
{
int run_interval = get_options()->KISTSchedRunInterval;
@@ -778,7 +774,7 @@ kist_scheduler_run_interval(const networkstatus_t *ns)
/* Will either be the consensus value or the default. Note that 0 can be
* returned which means the consensus wants us to NOT use KIST. */
- return networkstatus_get_param(ns, "KISTSchedRunInterval",
+ return networkstatus_get_param(NULL, "KISTSchedRunInterval",
KIST_SCHED_RUN_INTERVAL_DEFAULT,
KIST_SCHED_RUN_INTERVAL_MIN,
KIST_SCHED_RUN_INTERVAL_MAX);
@@ -817,7 +813,7 @@ scheduler_can_use_kist(void)
/* We do have the support, time to check if we can get the interval that the
* consensus can be disabling. */
- int run_interval = kist_scheduler_run_interval(NULL);
+ int run_interval = kist_scheduler_run_interval();
log_debug(LD_SCHED, "Determined KIST sched_run_interval should be "
"%" PRId32 ". Can%s use KIST.",
run_interval, (run_interval > 0 ? "" : " not"));