[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
[tor-commits] [tor/master] Wrap long lines
commit 74902c8aca96dda3178fac768223bcdb9a11f50c
Author: teor <teor@xxxxxxxxxx>
Date: Thu May 7 20:16:56 2020 +1000
Wrap long lines
---
src/core/or/circuituse.c | 3 ++-
src/feature/control/control_getinfo.c | 17 ++++++++++-------
src/feature/nodelist/node_select.c | 16 ++++++++++------
src/feature/nodelist/routerlist.c | 9 ++++++---
src/feature/nodelist/routerlist.h | 8 +++++---
src/feature/relay/selftest.c | 3 ++-
src/feature/relay/selftest.h | 6 ++++--
7 files changed, 39 insertions(+), 23 deletions(-)
diff --git a/src/core/or/circuituse.c b/src/core/or/circuituse.c
index 3ab527f42..46ebcc5dc 100644
--- a/src/core/or/circuituse.c
+++ b/src/core/or/circuituse.c
@@ -1659,7 +1659,8 @@ static void
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))
+ if (server_mode(options) &&
+ router_should_skip_orport_reachability_check(options))
return;
log_info(LD_GENERAL,
diff --git a/src/feature/control/control_getinfo.c b/src/feature/control/control_getinfo.c
index 52cf54b1c..39113b571 100644
--- a/src/feature/control/control_getinfo.c
+++ b/src/feature/control/control_getinfo.c
@@ -1276,15 +1276,18 @@ getinfo_helper_events(control_connection_t *control_conn,
*answer = tor_strdup(directories_have_accepted_server_descriptor()
? "1" : "0");
} else if (!strcmp(question, "status/reachability-succeeded/or")) {
- *answer = tor_strdup(router_should_skip_orport_reachability_check(options) ?
- "1" : "0");
+ *answer = tor_strdup(
+ router_should_skip_orport_reachability_check(options) ?
+ "1" : "0");
} else if (!strcmp(question, "status/reachability-succeeded/dir")) {
- *answer = tor_strdup(router_should_skip_dirport_reachability_check(options) ?
- "1" : "0");
+ *answer = tor_strdup(
+ router_should_skip_dirport_reachability_check(options) ?
+ "1" : "0");
} else if (!strcmp(question, "status/reachability-succeeded")) {
- tor_asprintf(answer, "OR=%d DIR=%d",
- router_should_skip_orport_reachability_check(options) ? 1 : 0,
- router_should_skip_dirport_reachability_check(options) ? 1 : 0);
+ tor_asprintf(
+ answer, "OR=%d DIR=%d",
+ router_should_skip_orport_reachability_check(options) ? 1 : 0,
+ router_should_skip_dirport_reachability_check(options) ? 1 : 0);
} else if (!strcmp(question, "status/bootstrap-phase")) {
*answer = control_event_boot_last_msg();
} else if (!strcmpstart(question, "status/version/")) {
diff --git a/src/feature/nodelist/node_select.c b/src/feature/nodelist/node_select.c
index d2118c524..bd63cd3b6 100644
--- a/src/feature/nodelist/node_select.c
+++ b/src/feature/nodelist/node_select.c
@@ -321,10 +321,12 @@ router_pick_directory_server_impl(dirinfo_type_t type, int flags,
overloaded_direct = smartlist_new();
overloaded_tunnel = smartlist_new();
- const int skip_or_fw = client_or_conn_should_skip_reachable_address_check(options,
+ const int skip_or_fw = client_or_conn_should_skip_reachable_address_check(
+ options,
+ try_ip_pref);
+ const int skip_dir_fw = client_dir_conn_should_skip_reachable_address_check(
+ options,
try_ip_pref);
- const int skip_dir_fw = client_dir_conn_should_skip_reachable_address_check(options,
- try_ip_pref);
const int must_have_or = dirclient_must_use_begindir(options);
/* Find all the running dirservers we know about. */
@@ -1122,10 +1124,12 @@ router_pick_trusteddirserver_impl(const smartlist_t *sourcelist,
overloaded_direct = smartlist_new();
overloaded_tunnel = smartlist_new();
- const int skip_or_fw = client_or_conn_should_skip_reachable_address_check(options,
+ const int skip_or_fw = client_or_conn_should_skip_reachable_address_check(
+ options,
+ try_ip_pref);
+ const int skip_dir_fw = client_dir_conn_should_skip_reachable_address_check(
+ options,
try_ip_pref);
- const int skip_dir_fw = client_dir_conn_should_skip_reachable_address_check(options,
- try_ip_pref);
const int must_have_or = dirclient_must_use_begindir(options);
SMARTLIST_FOREACH_BEGIN(sourcelist, const dir_server_t *, d)
diff --git a/src/feature/nodelist/routerlist.c b/src/feature/nodelist/routerlist.c
index 0e8fff7c3..2a5353c56 100644
--- a/src/feature/nodelist/routerlist.c
+++ b/src/feature/nodelist/routerlist.c
@@ -476,7 +476,8 @@ router_reload_router_list(void)
* Finally, return true if ReachableAddresses is set.
*/
int
-client_or_conn_should_skip_reachable_address_check(const or_options_t *options,
+client_or_conn_should_skip_reachable_address_check(
+ const or_options_t *options,
int try_ip_pref)
{
/* Servers always have and prefer IPv4.
@@ -491,7 +492,8 @@ client_or_conn_should_skip_reachable_address_check(const or_options_t *options,
* This function is obsolete, because clients only use ORPorts.
*/
int
-client_dir_conn_should_skip_reachable_address_check(const or_options_t *options,
+client_dir_conn_should_skip_reachable_address_check(
+ const or_options_t *options,
int try_ip_pref)
{
/* Servers always have and prefer IPv4.
@@ -518,7 +520,8 @@ router_add_running_nodes_to_smartlist(smartlist_t *sl, int need_uptime,
int need_desc, int pref_addr,
int direct_conn)
{
- const int check_reach = !client_or_conn_should_skip_reachable_address_check(get_options(),
+ const int check_reach = !client_or_conn_should_skip_reachable_address_check(
+ get_options(),
pref_addr);
/* XXXX MOVE */
SMARTLIST_FOREACH_BEGIN(nodelist_get_list(), const node_t *, node) {
diff --git a/src/feature/nodelist/routerlist.h b/src/feature/nodelist/routerlist.h
index 55eec6c3f..5256298d8 100644
--- a/src/feature/nodelist/routerlist.h
+++ b/src/feature/nodelist/routerlist.h
@@ -50,10 +50,12 @@ typedef enum was_router_added_t {
int router_reload_router_list(void);
-int client_or_conn_should_skip_reachable_address_check(const or_options_t *options,
+int client_or_conn_should_skip_reachable_address_check(
+ const or_options_t *options,
+ int try_ip_pref);
+int client_dir_conn_should_skip_reachable_address_check(
+ const or_options_t *options,
int try_ip_pref);
-int client_dir_conn_should_skip_reachable_address_check(const or_options_t *options,
- int try_ip_pref);
void router_reset_status_download_failures(void);
int routers_have_same_or_addrs(const routerinfo_t *r1, const routerinfo_t *r2);
void router_add_running_nodes_to_smartlist(smartlist_t *sl, int need_uptime,
diff --git a/src/feature/relay/selftest.c b/src/feature/relay/selftest.c
index a498e3dff..23e4a7dec 100644
--- a/src/feature/relay/selftest.c
+++ b/src/feature/relay/selftest.c
@@ -154,7 +154,8 @@ extend_info_from_router(const routerinfo_t *r, int family)
/* Relays always assume that the first hop is reachable. They ignore
* ReachableAddresses. */
- tor_assert_nonfatal(client_or_conn_should_skip_reachable_address_check(get_options(), 0));
+ tor_assert_nonfatal(client_or_conn_should_skip_reachable_address_check(
+ get_options(), 0));
const ed25519_public_key_t *ed_id_key;
if (r->cache_info.signing_key_cert)
diff --git a/src/feature/relay/selftest.h b/src/feature/relay/selftest.h
index f2350cf8f..5799a6ca3 100644
--- a/src/feature/relay/selftest.h
+++ b/src/feature/relay/selftest.h
@@ -15,8 +15,10 @@
#ifdef HAVE_MODULE_RELAY
struct or_options_t;
-int router_should_skip_orport_reachability_check(const struct or_options_t *options);
-int router_should_skip_dirport_reachability_check(const struct or_options_t *options);
+int router_should_skip_orport_reachability_check(
+ const struct or_options_t *options);
+int router_should_skip_dirport_reachability_check(
+ const struct or_options_t *options);
void router_do_reachability_checks(int test_or, int test_dir);
void router_perform_bandwidth_test(int num_circs, time_t now);
_______________________________________________
tor-commits mailing list
tor-commits@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits