diff options
author | huyvq <huyvq.c633@gmail.com> | 2017-06-02 23:26:53 +0700 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2017-06-21 13:49:17 -0400 |
commit | d92b999757336249bcff15c5c498e6e5353d38c4 (patch) | |
tree | 068e68aaabacafd7e82635591ff5296ef7eab144 /src | |
parent | 0471c905a18760413a63f05f50535313c76ca0c4 (diff) | |
download | tor-d92b999757336249bcff15c5c498e6e5353d38c4.tar.gz tor-d92b999757336249bcff15c5c498e6e5353d38c4.zip |
Convert authdir_mode_handles_descs(options, -1) with authdir_mode(options)
Diffstat (limited to 'src')
-rw-r--r-- | src/or/directory.c | 2 | ||||
-rw-r--r-- | src/or/main.c | 4 | ||||
-rw-r--r-- | src/or/router.c | 2 |
3 files changed, 4 insertions, 4 deletions
diff --git a/src/or/directory.c b/src/or/directory.c index b680b134a4..5e8e6638b6 100644 --- a/src/or/directory.c +++ b/src/or/directory.c @@ -4850,7 +4850,7 @@ directory_handle_command_post,(dir_connection_t *conn, const char *headers, goto done; } - if (authdir_mode_handles_descs(options, -1) && + if (authdir_mode(options) && !strcmp(url,"/tor/")) { /* server descriptor post */ const char *msg = "[None]"; uint8_t purpose = authdir_mode_bridge(options) ? diff --git a/src/or/main.c b/src/or/main.c index 9699c8d381..9709aebeb1 100644 --- a/src/or/main.c +++ b/src/or/main.c @@ -2355,7 +2355,7 @@ do_hup(void) tor_free(msg); } } - if (authdir_mode_handles_descs(options, -1)) { + if (authdir_mode(options)) { /* reload the approved-routers file */ if (dirserv_load_fingerprint_file() < 0) { /* warnings are logged from dirserv_load_fingerprint_file() directly */ @@ -3478,7 +3478,7 @@ sandbox_init_filter(void) if (options->BridgeAuthoritativeDir) OPEN_DATADIR_SUFFIX("networkstatus-bridges", ".tmp"); - if (authdir_mode_handles_descs(options, -1)) + if (authdir_mode(options)) OPEN_DATADIR("approved-routers"); if (options->ServerDNSResolvConfFile) diff --git a/src/or/router.c b/src/or/router.c index 849cffd8fa..a264af1551 100644 --- a/src/or/router.c +++ b/src/or/router.c @@ -1635,7 +1635,7 @@ authdir_mode_publishes_statuses(const or_options_t *options) int authdir_mode_tests_reachability(const or_options_t *options) { - return authdir_mode_handles_descs(options, -1); + return authdir_mode(options); } /** Return true iff we believe ourselves to be a bridge authoritative * directory server. |