From 4430515052e9a99cb1d25fd905f4924654c52264 Mon Sep 17 00:00:00 2001 From: "zugz (tox)" Date: Sun, 3 Apr 2022 00:00:00 +0000 Subject: [PATCH] cleanup: remove populate_path_nodes_tcp It was a no-op. --- .../bootstrap_daemon/docker/tox-bootstrapd.sha256 | 2 +- toxcore/network.c | 1 - toxcore/onion_client.c | 15 --------------- 3 files changed, 1 insertion(+), 17 deletions(-) diff --git a/other/bootstrap_daemon/docker/tox-bootstrapd.sha256 b/other/bootstrap_daemon/docker/tox-bootstrapd.sha256 index b8d600c5..9755082e 100644 --- a/other/bootstrap_daemon/docker/tox-bootstrapd.sha256 +++ b/other/bootstrap_daemon/docker/tox-bootstrapd.sha256 @@ -1 +1 @@ -f3781691aed256efccda556f5663a4ab95c460aa8c1d665667c8b80c44e4d630 /usr/local/bin/tox-bootstrapd +e1464fd52269f481bd529805f0e81f717c8586b0df93a0767507a6b2b8f3678b /usr/local/bin/tox-bootstrapd diff --git a/toxcore/network.c b/toxcore/network.c index 0f9e48ee..13eae1d0 100644 --- a/toxcore/network.c +++ b/toxcore/network.c @@ -1251,7 +1251,6 @@ Networking_Core *new_networking_no_udp(const Logger *log, const Network *ns) net->ns = ns; net->log = log; - net->ns = ns; return net; } diff --git a/toxcore/onion_client.c b/toxcore/onion_client.c index 9701f325..2eea3532 100644 --- a/toxcore/onion_client.c +++ b/toxcore/onion_client.c @@ -1540,19 +1540,6 @@ static void populate_path_nodes(Onion_Client *onion_c) } } -non_null() -static void populate_path_nodes_tcp(Onion_Client *onion_c) -{ - Node_format node_list[MAX_SENT_NODES]; - - const unsigned int num_nodes = copy_connected_tcp_relays(onion_c->c, node_list, MAX_SENT_NODES); - - for (unsigned int i = 0; i < num_nodes; ++i) { - // XXX: but ip_port is TCP, so will be rejected by onion_add_bs_path_node... - onion_add_bs_path_node(onion_c, &node_list[i].ip_port, node_list[i].public_key); - } -} - /* How often we ping new friends per node */ #define ANNOUNCE_FRIEND_NEW_INTERVAL 3 @@ -1900,8 +1887,6 @@ void do_onion_client(Onion_Client *onion_c) ++onion_c->onion_connected; } } else { - populate_path_nodes_tcp(onion_c); - if (onion_c->onion_connected != 0) { --onion_c->onion_connected; }