aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2019-04-30 12:48:00 -0400
committerNick Mathewson <nickm@torproject.org>2019-05-02 09:22:13 -0400
commit31fb4a78451a98a8d62e1f52e75e372a8a2dd48b (patch)
tree83f66c68ca9df8fe9a7884484501cd33e1855f99 /src
parent6f42efaa5926a2f1be89e3b591311f2130931db8 (diff)
downloadtor-31fb4a78451a98a8d62e1f52e75e372a8a2dd48b.tar.gz
tor-31fb4a78451a98a8d62e1f52e75e372a8a2dd48b.zip
Make the bwauth.c module dirauth-only.
Diffstat (limited to 'src')
-rw-r--r--src/app/config/config.c2
-rw-r--r--src/app/main/shutdown.c1
-rw-r--r--src/core/include.am7
-rw-r--r--src/feature/dirauth/dirauth_sys.c2
4 files changed, 4 insertions, 8 deletions
diff --git a/src/app/config/config.c b/src/app/config/config.c
index 3e0683eb56..26a3061a26 100644
--- a/src/app/config/config.c
+++ b/src/app/config/config.c
@@ -3556,12 +3556,12 @@ options_validate(or_options_t *old_options, or_options_t *options,
options->V3AuthoritativeDir))
REJECT("AuthoritativeDir is set, but none of "
"(Bridge/V3)AuthoritativeDir is set.");
+#ifdef HAVE_MODULE_DIRAUTH
/* If we have a v3bandwidthsfile and it's broken, complain on startup */
if (options->V3BandwidthsFile && !old_options) {
dirserv_read_measured_bandwidths(options->V3BandwidthsFile, NULL, NULL,
NULL);
}
-#ifdef HAVE_MODULE_DIRAUTH
/* same for guardfraction file */
if (options->GuardfractionFile && !old_options) {
dirserv_read_guardfraction_file(options->GuardfractionFile, NULL);
diff --git a/src/app/main/shutdown.c b/src/app/main/shutdown.c
index fd9512ce4b..92cd9c6f7b 100644
--- a/src/app/main/shutdown.c
+++ b/src/app/main/shutdown.c
@@ -128,7 +128,6 @@ tor_free_all(int postfork)
networkstatus_free_all();
addressmap_free_all();
dirserv_free_all();
- dirserv_clear_measured_bw_cache();
rend_cache_free_all();
rend_service_authorization_free_all();
rep_hist_free_all();
diff --git a/src/core/include.am b/src/core/include.am
index 63d4264210..18b6046bfc 100644
--- a/src/core/include.am
+++ b/src/core/include.am
@@ -150,12 +150,6 @@ LIBTOR_APP_A_SOURCES = \
src/feature/stats/rephist.c \
src/feature/stats/predict_ports.c
-# These should eventually move into module_dirauth_sources, but for now
-# the separation is only in the code location.
-LIBTOR_APP_A_SOURCES += \
- src/feature/dirauth/bwauth.c
-
-
if BUILD_NT_SERVICES
LIBTOR_APP_A_SOURCES += src/app/main/ntmain.c
endif
@@ -172,6 +166,7 @@ LIBTOR_APP_TESTING_A_SOURCES = $(LIBTOR_APP_A_SOURCES)
MODULE_DIRAUTH_SOURCES = \
src/feature/dirauth/authmode.c \
src/feature/dirauth/bridgeauth.c \
+ src/feature/dirauth/bwauth.c \
src/feature/dirauth/dirauth_periodic.c \
src/feature/dirauth/dirauth_sys.c \
src/feature/dirauth/dircollate.c \
diff --git a/src/feature/dirauth/dirauth_sys.c b/src/feature/dirauth/dirauth_sys.c
index b87fa5dc29..f691d5618a 100644
--- a/src/feature/dirauth/dirauth_sys.c
+++ b/src/feature/dirauth/dirauth_sys.c
@@ -6,6 +6,7 @@
#include "core/or/or.h"
+#include "feature/dirauth/bwauth.h"
#include "feature/dirauth/dirauth_sys.h"
#include "feature/dirauth/dirvote.h"
#include "feature/dirauth/dirauth_periodic.h"
@@ -25,6 +26,7 @@ subsys_dirauth_shutdown(void)
{
dirserv_free_fingerprint_list();
dirvote_free_all();
+ dirserv_clear_measured_bw_cache();
}
const struct subsys_fns_t sys_dirauth = {