aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorhuyvq <huyvq.c633@gmail.com>2017-06-02 23:23:39 +0700
committerNick Mathewson <nickm@torproject.org>2017-06-21 13:49:17 -0400
commit0471c905a18760413a63f05f50535313c76ca0c4 (patch)
tree82291e6930d92cf7252b41d91e3d28b8ea7aa485
parentf0a5416f95e06ebfd27eb95436eb85cd66494b9a (diff)
downloadtor-0471c905a18760413a63f05f50535313c76ca0c4.tar.gz
tor-0471c905a18760413a63f05f50535313c76ca0c4.zip
Remove obsolete authdir_mode_any_main()
-rw-r--r--src/or/config.c2
-rw-r--r--src/or/router.c8
-rw-r--r--src/or/router.h1
3 files changed, 2 insertions, 9 deletions
diff --git a/src/or/config.c b/src/or/config.c
index 3413442c3c..e17ae86e9c 100644
--- a/src/or/config.c
+++ b/src/or/config.c
@@ -3161,7 +3161,7 @@ options_validate(or_options_t *old_options, or_options_t *options,
"UseEntryGuards. Disabling.");
options->UseEntryGuards = 0;
}
- if (!options->DownloadExtraInfo && authdir_mode_any_main(options)) {
+ if (!options->DownloadExtraInfo && authdir_mode_v3(options)) {
log_info(LD_CONFIG, "Authoritative directories always try to download "
"extra-info documents. Setting DownloadExtraInfo.");
options->DownloadExtraInfo = 1;
diff --git a/src/or/router.c b/src/or/router.c
index 2187a76b48..849cffd8fa 100644
--- a/src/or/router.c
+++ b/src/or/router.c
@@ -1596,12 +1596,6 @@ authdir_mode_v3(const or_options_t *options)
{
return authdir_mode(options) && options->V3AuthoritativeDir != 0;
}
-/** Return true iff we are a v3 directory authority. */
-int
-authdir_mode_any_main(const or_options_t *options)
-{
- return options->V3AuthoritativeDir;
-}
/** Return true if we believe ourselves to be any kind of
* authoritative directory beyond just a hidserv authority. */
int
@@ -1619,7 +1613,7 @@ authdir_mode_handles_descs(const or_options_t *options, int purpose)
if (purpose < 0)
return authdir_mode_any_nonhidserv(options);
else if (purpose == ROUTER_PURPOSE_GENERAL)
- return authdir_mode_any_main(options);
+ return authdir_mode_v3(options);
else if (purpose == ROUTER_PURPOSE_BRIDGE)
return (options->BridgeAuthoritativeDir);
else
diff --git a/src/or/router.h b/src/or/router.h
index 9c5def5218..2e6218540f 100644
--- a/src/or/router.h
+++ b/src/or/router.h
@@ -54,7 +54,6 @@ int net_is_disabled(void);
int authdir_mode(const or_options_t *options);
int authdir_mode_v3(const or_options_t *options);
-int authdir_mode_any_main(const or_options_t *options);
int authdir_mode_any_nonhidserv(const or_options_t *options);
int authdir_mode_handles_descs(const or_options_t *options, int purpose);
int authdir_mode_publishes_statuses(const or_options_t *options);