[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

[tor-commits] [tor/master] Rename router_should_skip_orport_reachability_check.



commit f9de0affd3f50d411e04bc1229525af2a14927fd
Author: Nick Mathewson <nickm@xxxxxxxxxxxxxx>
Date:   Wed Jun 24 14:39:01 2020 -0400

    Rename router_should_skip_orport_reachability_check.
    
    This was supposed to happen in #40012, but the command line was wrong.
    
    This is an automated commit, generated by this command:
    
    ./scripts/maint/rename_c_identifier.py \
            router_should_skip_orport_reachability_check router_all_orports_seem_reachable
---
 src/core/or/circuitbuild.c            | 2 +-
 src/core/or/circuituse.c              | 4 ++--
 src/feature/control/control_getinfo.c | 4 ++--
 src/feature/relay/router.c            | 2 +-
 src/feature/relay/selftest.c          | 2 +-
 src/feature/relay/selftest.h          | 4 ++--
 src/feature/stats/predict_ports.c     | 2 +-
 7 files changed, 10 insertions(+), 10 deletions(-)

diff --git a/src/core/or/circuitbuild.c b/src/core/or/circuitbuild.c
index be8ec6f3c..652d85b1c 100644
--- a/src/core/or/circuitbuild.c
+++ b/src/core/or/circuitbuild.c
@@ -1055,7 +1055,7 @@ circuit_build_no_more_hops(origin_circuit_t *circ)
     control_event_client_status(LOG_NOTICE, "CIRCUIT_ESTABLISHED");
     clear_broken_connection_map(1);
     if (server_mode(options) &&
-        !router_should_skip_orport_reachability_check(options)) {
+        !router_all_orports_seem_reachable(options)) {
       inform_testing_reachability();
       router_do_reachability_checks(1, 1);
     }
diff --git a/src/core/or/circuituse.c b/src/core/or/circuituse.c
index 735881753..f4cd4ced4 100644
--- a/src/core/or/circuituse.c
+++ b/src/core/or/circuituse.c
@@ -1642,7 +1642,7 @@ static void
 circuit_testing_opened(origin_circuit_t *circ)
 {
   if (have_performed_bandwidth_test ||
-      !router_should_skip_orport_reachability_check(get_options())) {
+      !router_all_orports_seem_reachable(get_options())) {
     /* either we've already done everything we want with testing circuits,
      * or this testing circuit became open due to a fluke, e.g. we picked
      * a last hop where we already had the connection open due to an
@@ -1661,7 +1661,7 @@ circuit_testing_failed(origin_circuit_t *circ, int at_last_hop)
 {
   const or_options_t *options = get_options();
   if (server_mode(options) &&
-      router_should_skip_orport_reachability_check(options))
+      router_all_orports_seem_reachable(options))
     return;
 
   log_info(LD_GENERAL,
diff --git a/src/feature/control/control_getinfo.c b/src/feature/control/control_getinfo.c
index 8d6c314b4..47e0224a9 100644
--- a/src/feature/control/control_getinfo.c
+++ b/src/feature/control/control_getinfo.c
@@ -1279,7 +1279,7 @@ getinfo_helper_events(control_connection_t *control_conn,
                            ? "1" : "0");
     } else if (!strcmp(question, "status/reachability-succeeded/or")) {
       *answer = tor_strdup(
-                    router_should_skip_orport_reachability_check(options) ?
+                    router_all_orports_seem_reachable(options) ?
                     "1" : "0");
     } else if (!strcmp(question, "status/reachability-succeeded/dir")) {
       *answer = tor_strdup(
@@ -1288,7 +1288,7 @@ getinfo_helper_events(control_connection_t *control_conn,
     } else if (!strcmp(question, "status/reachability-succeeded")) {
       tor_asprintf(
           answer, "OR=%d DIR=%d",
-          router_should_skip_orport_reachability_check(options) ? 1 : 0,
+          router_all_orports_seem_reachable(options) ? 1 : 0,
           router_dirport_seems_reachable(options) ? 1 : 0);
     } else if (!strcmp(question, "status/bootstrap-phase")) {
       *answer = control_event_boot_last_msg();
diff --git a/src/feature/relay/router.c b/src/feature/relay/router.c
index 1691ac5f4..1933f61ed 100644
--- a/src/feature/relay/router.c
+++ b/src/feature/relay/router.c
@@ -1363,7 +1363,7 @@ decide_if_publishable_server(void)
     return 1;
   if (!router_get_advertised_or_port(options))
     return 0;
-  if (!router_should_skip_orport_reachability_check(options))
+  if (!router_all_orports_seem_reachable(options))
     return 0;
   if (router_have_consensus_path() == CONSENSUS_PATH_INTERNAL) {
     /* All set: there are no exits in the consensus (maybe this is a tiny
diff --git a/src/feature/relay/selftest.c b/src/feature/relay/selftest.c
index 71054e6e8..64b8578ba 100644
--- a/src/feature/relay/selftest.c
+++ b/src/feature/relay/selftest.c
@@ -408,7 +408,7 @@ ready_to_publish(const or_options_t *options)
 {
   return options->PublishServerDescriptor_ != NO_DIRINFO &&
     router_dirport_seems_reachable(options) &&
-    router_should_skip_orport_reachability_check(options);
+    router_all_orports_seem_reachable(options);
 }
 
 /** Annotate that we found our ORPort reachable with a given address
diff --git a/src/feature/relay/selftest.h b/src/feature/relay/selftest.h
index 9b7005db3..911d8bdc3 100644
--- a/src/feature/relay/selftest.h
+++ b/src/feature/relay/selftest.h
@@ -15,7 +15,7 @@
 #ifdef HAVE_MODULE_RELAY
 
 struct or_options_t;
-#define router_should_skip_orport_reachability_check(opts) \
+#define router_all_orports_seem_reachable(opts) \
   router_orport_seems_reachable((opts),0)
 int router_orport_seems_reachable(
                                          const struct or_options_t *options,
@@ -34,7 +34,7 @@ void router_reset_reachability(void);
 
 #else /* !defined(HAVE_MODULE_RELAY) */
 
-#define router_should_skip_orport_reachability_check(opts)     \
+#define router_all_orports_seem_reachable(opts)     \
   ((void)(opts), 0)
 #define router_orport_seems_reachable(opts, fam)  \
   ((void)(opts), (void)(fam), 0)
diff --git a/src/feature/stats/predict_ports.c b/src/feature/stats/predict_ports.c
index 37f7f4c58..57463952e 100644
--- a/src/feature/stats/predict_ports.c
+++ b/src/feature/stats/predict_ports.c
@@ -270,7 +270,7 @@ rep_hist_circbuilding_dormant(time_t now)
 
   /* see if we'll still need to build testing circuits */
   if (server_mode(options) &&
-      (!router_should_skip_orport_reachability_check(options) ||
+      (!router_all_orports_seem_reachable(options) ||
        !circuit_enough_testing_circs()))
     return 0;
   if (!router_dirport_seems_reachable(options))



_______________________________________________
tor-commits mailing list
tor-commits@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits