From a66791230f7ca09953163fcc0fa8ced8143b599f Mon Sep 17 00:00:00 2001 From: Roger Dingledine Date: Tue, 3 Sep 2013 20:58:15 -0400 Subject: let the NumNTorsPerTAP consensus param override our queue choice --- src/or/onion.c | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/src/or/onion.c b/src/or/onion.c index 639481bfe..4ea2061ef 100644 --- a/src/or/onion.c +++ b/src/or/onion.c @@ -14,6 +14,7 @@ #include "circuitlist.h" #include "config.h" #include "cpuworker.h" +#include "networkstatus.h" #include "onion.h" #include "onion_fast.h" #include "onion_ntor.h" @@ -171,8 +172,14 @@ onion_pending_add(or_circuit_t *circ, create_cell_t *onionskin) static int num_ntors_per_tap(void) { -#define NUM_NTORS_PER_TAP 5 - return NUM_NTORS_PER_TAP; +#define DEFAULT_NUM_NTORS_PER_TAP 10 +#define MIN_NUM_NTORS_PER_TAP 0 +#define MAX_NUM_NTORS_PER_TAP 100000 + + return networkstatus_get_param(NULL, "NumNTorsPerTAP", + DEFAULT_NUM_NTORS_PER_TAP, + MIN_NUM_NTORS_PER_TAP, + MAX_NUM_NTORS_PER_TAP); } /** Choose which onion queue we'll pull from next. If one is empty choose -- cgit v1.2.3