aboutsummaryrefslogtreecommitdiff
path: root/src/or/dirserv.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/or/dirserv.c')
-rw-r--r--src/or/dirserv.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/src/or/dirserv.c b/src/or/dirserv.c
index b43f63b3b8..f4ba02b4ad 100644
--- a/src/or/dirserv.c
+++ b/src/or/dirserv.c
@@ -1227,7 +1227,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;
@@ -1263,7 +1263,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
@@ -1272,7 +1272,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
@@ -1281,7 +1281,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;
@@ -1297,7 +1297,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
@@ -1306,7 +1306,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
@@ -2142,7 +2142,7 @@ routerstatus_format_entry(char *buf, size_t buf_len,
/* length of "opt v \n" */
#define V_LINE_OVERHEAD 7
if (version && strlen(version) < MAX_V_LINE_LEN - V_LINE_OVERHEAD) {
- if (tor_snprintf(cp, buf_len - (cp-buf), "opt v %s\n", version)<0) {
+ if (tor_snprintf(cp, buf_len - (cp-buf), "v %s\n", version)<0) {
log_warn(LD_BUG, "Unable to print router version.");
return -1;
}