commit d92b999757336249bcff15c5c498e6e5353d38c4 Author: huyvq huyvq.c633@gmail.com Date: Fri Jun 2 23:26:53 2017 +0700
Convert authdir_mode_handles_descs(options, -1) with authdir_mode(options) --- src/or/directory.c | 2 +- src/or/main.c | 4 ++-- 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 b680b13..5e8e663 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 9699c8d..9709aeb 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 849cffd..a264af1 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.