mirror of
https://gitlab.torproject.org/tpo/core/tor.git
synced 2024-11-11 05:33:47 +01:00
Remove obsolete authdir_mode_any_main()
This commit is contained in:
parent
f0a5416f95
commit
0471c905a1
@ -3161,7 +3161,7 @@ options_validate(or_options_t *old_options, or_options_t *options,
|
|||||||
"UseEntryGuards. Disabling.");
|
"UseEntryGuards. Disabling.");
|
||||||
options->UseEntryGuards = 0;
|
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 "
|
log_info(LD_CONFIG, "Authoritative directories always try to download "
|
||||||
"extra-info documents. Setting DownloadExtraInfo.");
|
"extra-info documents. Setting DownloadExtraInfo.");
|
||||||
options->DownloadExtraInfo = 1;
|
options->DownloadExtraInfo = 1;
|
||||||
|
@ -1596,12 +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 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
|
/** Return true if we believe ourselves to be any kind of
|
||||||
* authoritative directory beyond just a hidserv authority. */
|
* authoritative directory beyond just a hidserv authority. */
|
||||||
int
|
int
|
||||||
@ -1619,7 +1613,7 @@ 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_any_nonhidserv(options);
|
||||||
else if (purpose == ROUTER_PURPOSE_GENERAL)
|
else if (purpose == ROUTER_PURPOSE_GENERAL)
|
||||||
return authdir_mode_any_main(options);
|
return authdir_mode_v3(options);
|
||||||
else if (purpose == ROUTER_PURPOSE_BRIDGE)
|
else if (purpose == ROUTER_PURPOSE_BRIDGE)
|
||||||
return (options->BridgeAuthoritativeDir);
|
return (options->BridgeAuthoritativeDir);
|
||||||
else
|
else
|
||||||
|
@ -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_main(const or_options_t *options);
|
|
||||||
int authdir_mode_any_nonhidserv(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);
|
||||||
|
Loading…
Reference in New Issue
Block a user