diff options
author | Nick Mathewson <nickm@torproject.org> | 2012-08-17 12:34:52 -0400 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2012-08-17 12:34:52 -0400 |
commit | 1728801bbc42f45e561812d8655b7f46fc740ea8 (patch) | |
tree | da167c310b0e16ec2b15afe94154b999eebc4b42 /src/or/dirserv.c | |
parent | a4669d8704af7e9d978cb392e6a8df79376207b3 (diff) | |
parent | 676f71054f11727fdfa8707979d8c6fe143c9333 (diff) | |
download | tor-1728801bbc42f45e561812d8655b7f46fc740ea8.tar.gz tor-1728801bbc42f45e561812d8655b7f46fc740ea8.zip |
Merge remote-tracking branch 'origin/maint-0.2.3'
Diffstat (limited to 'src/or/dirserv.c')
-rw-r--r-- | src/or/dirserv.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/or/dirserv.c b/src/or/dirserv.c index d12ed8a811..90b81015f4 100644 --- a/src/or/dirserv.c +++ b/src/or/dirserv.c @@ -1214,7 +1214,7 @@ directory_fetches_from_authorities(const or_options_t *options) return 1; /* we don't know our IP address; ask an authority. */ refuseunknown = ! router_my_exit_policy_is_reject_star() && should_refuse_unknown_exits(options); - if (options->DirPort == NULL && !refuseunknown) + if (!options->DirPort_set && !refuseunknown) return 0; if (!server_mode(options) || !advertised_server_mode()) return 0; @@ -1250,7 +1250,7 @@ directory_fetches_dir_info_later(const or_options_t *options) int directory_caches_v2_dir_info(const or_options_t *options) { - return options->DirPort != NULL; + return options->DirPort_set; } /** Return true iff we want to fetch and keep certificates for authorities @@ -1259,7 +1259,7 @@ directory_caches_v2_dir_info(const or_options_t *options) int directory_caches_unknown_auth_certs(const or_options_t *options) { - return options->DirPort || options->BridgeRelay; + return options->DirPort_set || options->BridgeRelay; } /** Return 1 if we want to keep descriptors, networkstatuses, etc around @@ -1268,7 +1268,7 @@ directory_caches_unknown_auth_certs(const or_options_t *options) int directory_caches_dir_info(const or_options_t *options) { - if (options->BridgeRelay || options->DirPort) + if (options->BridgeRelay || options->DirPort_set) return 1; if (!server_mode(options) || !advertised_server_mode()) return 0; @@ -1284,7 +1284,7 @@ directory_caches_dir_info(const or_options_t *options) int directory_permits_begindir_requests(const or_options_t *options) { - return options->BridgeRelay != 0 || options->DirPort != NULL; + return options->BridgeRelay != 0 || options->DirPort_set; } /** Return 1 if we want to allow controllers to ask us directory @@ -1293,7 +1293,7 @@ directory_permits_begindir_requests(const or_options_t *options) int directory_permits_controller_requests(const or_options_t *options) { - return options->DirPort != NULL; + return options->DirPort_set; } /** Return 1 if we have no need to fetch new descriptors. This generally |