summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2017-01-18 15:08:42 -0500
committerNick Mathewson <nickm@torproject.org>2017-01-18 15:08:42 -0500
commit31dd7dec9a9ca6cf6e146fc429ee6be8bcd2042d (patch)
treed3aa735cbe3e43e2e857394387a2d974bf23518d /src
parent9d47f4d298553cbbafa5afb65e4972bff0b3024a (diff)
parente0e729d4b52ef4a14e63e194ff0a47a0aa0d0f99 (diff)
downloadtor-31dd7dec9a9ca6cf6e146fc429ee6be8bcd2042d.tar.gz
tor-31dd7dec9a9ca6cf6e146fc429ee6be8bcd2042d.zip
Merge branch 'bug20684_030_01'
Diffstat (limited to 'src')
-rw-r--r--src/or/config.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/src/or/config.c b/src/or/config.c
index c4e9ca2403..2584fe6dba 100644
--- a/src/or/config.c
+++ b/src/or/config.c
@@ -4350,8 +4350,8 @@ compute_real_max_mem_in_queues(const uint64_t val, int log_guess)
}
/* If we have less than 300 MB suggest disabling dircache */
-#define DIRCACHE_MIN_MB_BANDWIDTH 300
-#define DIRCACHE_MIN_BANDWIDTH (DIRCACHE_MIN_MB_BANDWIDTH*ONE_MEGABYTE)
+#define DIRCACHE_MIN_MEM_MB 300
+#define DIRCACHE_MIN_MEM_BYTES (DIRCACHE_MIN_MEM_MB*ONE_MEGABYTE)
#define STRINGIFY(val) #val
/** Create a warning message for emitting if we are a dircache but may not have
@@ -4371,21 +4371,21 @@ have_enough_mem_for_dircache(const or_options_t *options, size_t total_mem,
}
}
if (options->DirCache) {
- if (total_mem < DIRCACHE_MIN_BANDWIDTH) {
+ if (total_mem < DIRCACHE_MIN_MEM_BYTES) {
if (options->BridgeRelay) {
*msg = tor_strdup("Running a Bridge with less than "
- STRINGIFY(DIRCACHE_MIN_MB_BANDWIDTH) " MB of memory is "
- "not recommended.");
+ STRINGIFY(DIRCACHE_MIN_MEM_MB) " MB of memory is not "
+ "recommended.");
} else {
*msg = tor_strdup("Being a directory cache (default) with less than "
- STRINGIFY(DIRCACHE_MIN_MB_BANDWIDTH) " MB of memory is "
- "not recommended and may consume most of the available "
+ STRINGIFY(DIRCACHE_MIN_MEM_MB) " MB of memory is not "
+ "recommended and may consume most of the available "
"resources, consider disabling this functionality by "
"setting the DirCache option to 0.");
}
}
} else {
- if (total_mem >= DIRCACHE_MIN_BANDWIDTH) {
+ if (total_mem >= DIRCACHE_MIN_MEM_BYTES) {
*msg = tor_strdup("DirCache is disabled and we are configured as a "
"relay. This may disqualify us from becoming a guard in the "
"future.");