mirror of
https://gitlab.torproject.org/tpo/core/tor.git
synced 2024-11-11 05:33:47 +01:00
back out a little bit of r11817 to preserve current behavior.
some other behavior changes left in. svn:r11821
This commit is contained in:
parent
a5851939c0
commit
4f23045e58
@ -272,7 +272,7 @@ directory_get_from_dirserver(uint8_t dir_purpose, uint8_t router_purpose,
|
||||
{
|
||||
routerstatus_t *rs = NULL;
|
||||
or_options_t *options = get_options();
|
||||
int prefer_authority = dirserver_mode(options);
|
||||
int prefer_authority = server_mode(options) && dirserver_mode(options);
|
||||
int get_via_tor = purpose_needs_anonymity(dir_purpose, router_purpose);
|
||||
authority_type_t type;
|
||||
|
||||
@ -2753,7 +2753,8 @@ dir_routerdesc_download_failed(smartlist_t *failed, int status_code,
|
||||
{
|
||||
char digest[DIGEST_LEN];
|
||||
time_t now = time(NULL);
|
||||
int server = dirserver_mode(get_options());
|
||||
or_options_t *options = get_options();
|
||||
int server = server_mode(options) && dirserver_mode(options);
|
||||
if (!was_descriptor_digests)
|
||||
return; /* FFFF should implement this someday */
|
||||
SMARTLIST_FOREACH(failed, const char *, cp,
|
||||
|
@ -858,7 +858,7 @@ server_mode(or_options_t *options)
|
||||
int
|
||||
dirserver_mode(or_options_t *options)
|
||||
{
|
||||
if (options->ClientOnly) return 0;
|
||||
// if (options->ClientOnly) return 0;
|
||||
return options->DirPort != 0;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user