mirror of
https://gitlab.torproject.org/tpo/core/tor.git
synced 2024-11-11 05:33:47 +01:00
Remove obsolete authdir_mode_any_nonhidserv()
- Replace it with authdir_mode()
This commit is contained in:
parent
18cd1993ca
commit
ad97714f22
@ -1596,14 +1596,6 @@ authdir_mode_v3(const or_options_t *options)
|
|||||||
{
|
{
|
||||||
return authdir_mode(options) && options->V3AuthoritativeDir != 0;
|
return authdir_mode(options) && options->V3AuthoritativeDir != 0;
|
||||||
}
|
}
|
||||||
/** Return true if we believe ourselves to be any kind of
|
|
||||||
* authoritative directory beyond just a hidserv authority. */
|
|
||||||
int
|
|
||||||
authdir_mode_any_nonhidserv(const or_options_t *options)
|
|
||||||
{
|
|
||||||
return options->BridgeAuthoritativeDir ||
|
|
||||||
authdir_mode_any_main(options);
|
|
||||||
}
|
|
||||||
/** Return true iff we are an authoritative directory server that is
|
/** Return true iff we are an authoritative directory server that is
|
||||||
* authoritative about receiving and serving descriptors of type
|
* authoritative about receiving and serving descriptors of type
|
||||||
* <b>purpose</b> on its dirport. Use -1 for "any purpose". */
|
* <b>purpose</b> on its dirport. Use -1 for "any purpose". */
|
||||||
@ -1611,7 +1603,7 @@ int
|
|||||||
authdir_mode_handles_descs(const or_options_t *options, int purpose)
|
authdir_mode_handles_descs(const or_options_t *options, int purpose)
|
||||||
{
|
{
|
||||||
if (purpose < 0)
|
if (purpose < 0)
|
||||||
return authdir_mode_any_nonhidserv(options);
|
return authdir_mode(options);
|
||||||
else if (purpose == ROUTER_PURPOSE_GENERAL)
|
else if (purpose == ROUTER_PURPOSE_GENERAL)
|
||||||
return authdir_mode_v3(options);
|
return authdir_mode_v3(options);
|
||||||
else if (purpose == ROUTER_PURPOSE_BRIDGE)
|
else if (purpose == ROUTER_PURPOSE_BRIDGE)
|
||||||
@ -1627,7 +1619,7 @@ authdir_mode_publishes_statuses(const or_options_t *options)
|
|||||||
{
|
{
|
||||||
if (authdir_mode_bridge(options))
|
if (authdir_mode_bridge(options))
|
||||||
return 0;
|
return 0;
|
||||||
return authdir_mode_any_nonhidserv(options);
|
return authdir_mode(options);
|
||||||
}
|
}
|
||||||
/** Return true iff we are an authoritative directory server that
|
/** Return true iff we are an authoritative directory server that
|
||||||
* tests reachability of the descriptors it learns about.
|
* tests reachability of the descriptors it learns about.
|
||||||
|
@ -54,7 +54,6 @@ int net_is_disabled(void);
|
|||||||
|
|
||||||
int authdir_mode(const or_options_t *options);
|
int authdir_mode(const or_options_t *options);
|
||||||
int authdir_mode_v3(const or_options_t *options);
|
int authdir_mode_v3(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_handles_descs(const or_options_t *options, int purpose);
|
||||||
int authdir_mode_publishes_statuses(const or_options_t *options);
|
int authdir_mode_publishes_statuses(const or_options_t *options);
|
||||||
int authdir_mode_tests_reachability(const or_options_t *options);
|
int authdir_mode_tests_reachability(const or_options_t *options);
|
||||||
|
@ -5033,7 +5033,7 @@ launch_descriptor_downloads(int purpose,
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!authdir_mode_any_nonhidserv(options)) {
|
if (!authdir_mode(options)) {
|
||||||
/* If we wind up going to the authorities, we want to only open one
|
/* If we wind up going to the authorities, we want to only open one
|
||||||
* connection to each authority at a time, so that we don't overload
|
* connection to each authority at a time, so that we don't overload
|
||||||
* them. We do this by setting PDS_NO_EXISTING_SERVERDESC_FETCH
|
* them. We do this by setting PDS_NO_EXISTING_SERVERDESC_FETCH
|
||||||
|
Loading…
Reference in New Issue
Block a user