aboutsummaryrefslogtreecommitdiff
path: root/src/or/directory.c
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2007-10-09 20:44:47 +0000
committerNick Mathewson <nickm@torproject.org>2007-10-09 20:44:47 +0000
commit8b71a76dd322ab0043871cac3c299cd660471121 (patch)
tree3e81cd2444e9335ec592a5b70725fb43d40a734f /src/or/directory.c
parent010fd50c365f90f98e9e8ec243a573aba4c53cfa (diff)
downloadtor-8b71a76dd322ab0043871cac3c299cd660471121.tar
tor-8b71a76dd322ab0043871cac3c299cd660471121.tar.gz
r15598@catbus: nickm | 2007-10-09 16:37:35 -0400
Turn all "Is DirPort nonzero? Because if it is, we must be a directory" logic into calls to dirserver_mode(). svn:r11817
Diffstat (limited to 'src/or/directory.c')
-rw-r--r--src/or/directory.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/or/directory.c b/src/or/directory.c
index e41b790e6..75a7e5ad8 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 = server_mode(options) && options->DirPort != 0;
+ int prefer_authority = dirserver_mode(options);
int get_via_tor = purpose_needs_anonymity(dir_purpose, router_purpose);
authority_type_t type;
@@ -2753,7 +2753,7 @@ dir_routerdesc_download_failed(smartlist_t *failed, int status_code,
{
char digest[DIGEST_LEN];
time_t now = time(NULL);
- int server = server_mode(get_options()) && get_options()->DirPort;
+ int server = dirserver_mode(get_options());
if (!was_descriptor_digests)
return; /* FFFF should implement this someday */
SMARTLIST_FOREACH(failed, const char *, cp,