summaryrefslogtreecommitdiff
path: root/toxcore/net_crypto.c
diff options
context:
space:
mode:
Diffstat (limited to 'toxcore/net_crypto.c')
-rw-r--r--toxcore/net_crypto.c12
1 files changed, 2 insertions, 10 deletions
diff --git a/toxcore/net_crypto.c b/toxcore/net_crypto.c
index a1286c5d..c5872068 100644
--- a/toxcore/net_crypto.c
+++ b/toxcore/net_crypto.c
@@ -2029,13 +2029,8 @@ int add_tcp_relay(Net_Crypto *c, IP_Port ip_port, const uint8_t *public_key)
2029 2029
2030 for (i = 0; i < MAX_TCP_CONNECTIONS; ++i) { 2030 for (i = 0; i < MAX_TCP_CONNECTIONS; ++i) {
2031 if (c->tcp_connections_new[i] == NULL) { 2031 if (c->tcp_connections_new[i] == NULL) {
2032 if (c->proxy_set) { 2032 c->tcp_connections_new[i] = new_TCP_connection(ip_port, public_key, c->dht->self_public_key, c->dht->self_secret_key,
2033 c->tcp_connections_new[i] = new_TCP_connection(ip_port, public_key, c->dht->self_public_key, c->dht->self_secret_key,
2034 &c->proxy_info); 2033 &c->proxy_info);
2035 } else {
2036 c->tcp_connections_new[i] = new_TCP_connection(ip_port, public_key, c->dht->self_public_key, c->dht->self_secret_key,
2037 0);
2038 }
2039 2034
2040 return 0; 2035 return 0;
2041 } 2036 }
@@ -2768,10 +2763,7 @@ Net_Crypto *new_net_crypto(DHT *dht, TCP_Proxy_Info *proxy_info)
2768 2763
2769 bs_list_init(&temp->ip_port_list, sizeof(IP_Port), 8); 2764 bs_list_init(&temp->ip_port_list, sizeof(IP_Port), 8);
2770 2765
2771 if (proxy_info) { 2766 temp->proxy_info = *proxy_info;
2772 temp->proxy_info = *proxy_info;
2773 temp->proxy_set = 1;
2774 }
2775 2767
2776 return temp; 2768 return temp;
2777} 2769}