aboutsummaryrefslogtreecommitdiff
path: root/src/or/onion.c
diff options
context:
space:
mode:
authorRoger Dingledine <arma@torproject.org>2013-09-03 20:58:15 -0400
committerRoger Dingledine <arma@torproject.org>2013-09-04 23:21:45 -0400
commita66791230f7ca09953163fcc0fa8ced8143b599f (patch)
treea15c33f0af7d368d9ab7f1a03c5a5f74913b9559 /src/or/onion.c
parent7acc7c3dc6299438f7d5e6ebc6cb64f2ea3b5fa6 (diff)
downloadtor-a66791230f7ca09953163fcc0fa8ced8143b599f.tar
tor-a66791230f7ca09953163fcc0fa8ced8143b599f.tar.gz
let the NumNTorsPerTAP consensus param override our queue choice
Diffstat (limited to 'src/or/onion.c')
-rw-r--r--src/or/onion.c11
1 files 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