diff options
Diffstat (limited to 'src/or/scheduler_kist.c')
-rw-r--r-- | src/or/scheduler_kist.c | 20 |
1 files changed, 8 insertions, 12 deletions
diff --git a/src/or/scheduler_kist.c b/src/or/scheduler_kist.c index f50f3aa9e9..877e561e01 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(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() */ @@ -770,7 +766,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; @@ -784,7 +780,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); @@ -823,7 +819,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")); |