diff options
author | Nick Mathewson <nickm@torproject.org> | 2020-06-17 16:27:14 -0400 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2020-06-17 16:29:24 -0400 |
commit | 6c3897826a21734d2ab4f621df62e337d8bb8391 (patch) | |
tree | d4dccb9be3fd995260201b18847519f52ce2b7c5 /src/feature | |
parent | 48ff6a41aed1e2b57f1766206324bc9dc33c19d1 (diff) | |
download | tor-6c3897826a21734d2ab4f621df62e337d8bb8391.tar.gz tor-6c3897826a21734d2ab4f621df62e337d8bb8391.zip |
selftest: turn can_reach_{dir,or}_port into bools
Diffstat (limited to 'src/feature')
-rw-r--r-- | src/feature/relay/selftest.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/feature/relay/selftest.c b/src/feature/relay/selftest.c index 2b0fc951b7..834e8cf0a7 100644 --- a/src/feature/relay/selftest.c +++ b/src/feature/relay/selftest.c @@ -45,15 +45,15 @@ #include "feature/relay/selftest.h" /** Whether we can reach our ORPort from the outside. */ -static int can_reach_or_port = 0; +static bool can_reach_or_port = false; /** Whether we can reach our DirPort from the outside. */ -static int can_reach_dir_port = 0; +static bool can_reach_dir_port = false; /** Forget what we have learned about our reachability status. */ void router_reset_reachability(void) { - can_reach_or_port = can_reach_dir_port = 0; + can_reach_or_port = can_reach_dir_port = false; } /** Return 1 if we won't do reachability checks, because: @@ -358,7 +358,7 @@ router_orport_found_reachable(void) options->PublishServerDescriptor_ != NO_DIRINFO && router_should_skip_dirport_reachability_check(options) ? " Publishing server descriptor." : ""); - can_reach_or_port = 1; + can_reach_or_port = true; mark_my_descriptor_dirty("ORPort found reachable"); /* This is a significant enough change to upload immediately, * at least in a test network */ @@ -390,7 +390,7 @@ router_dirport_found_reachable(void) options->PublishServerDescriptor_ != NO_DIRINFO && router_should_skip_orport_reachability_check(options) ? " Publishing server descriptor." : ""); - can_reach_dir_port = 1; + can_reach_dir_port = true; if (router_should_advertise_dirport(options, me->dir_port)) { mark_my_descriptor_dirty("DirPort found reachable"); /* This is a significant enough change to upload immediately, |