From 4f23045e58ff5d55adcaf36290cbfe12380f4df9 Mon Sep 17 00:00:00 2001 From: Roger Dingledine Date: Tue, 9 Oct 2007 21:12:48 +0000 Subject: [PATCH] back out a little bit of r11817 to preserve current behavior. some other behavior changes left in. svn:r11821 --- src/or/directory.c | 5 +++-- src/or/router.c | 2 +- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/src/or/directory.c b/src/or/directory.c index 75a7e5ad80..bcb44ebe12 100644 --- a/src/or/directory.c +++ b/src/or/directory.c @@ -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, diff --git a/src/or/router.c b/src/or/router.c index 78a158a587..29d44c33ec 100644 --- a/src/or/router.c +++ b/src/or/router.c @@ -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; }