[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

[tor-commits] [tor/master] Remove obsolete authdir_mode_any_main()



commit 0471c905a18760413a63f05f50535313c76ca0c4
Author: huyvq <huyvq.c633@xxxxxxxxx>
Date:   Fri Jun 2 23:23:39 2017 +0700

    Remove obsolete authdir_mode_any_main()
---
 src/or/config.c | 2 +-
 src/or/router.c | 8 +-------
 src/or/router.h | 1 -
 3 files changed, 2 insertions(+), 9 deletions(-)

diff --git a/src/or/config.c b/src/or/config.c
index 3413442..e17ae86 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 2187a76..849cffd 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 9c5def5..2e62185 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);



_______________________________________________
tor-commits mailing list
tor-commits@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits