summaryrefslogtreecommitdiff
path: root/toxcore
diff options
context:
space:
mode:
Diffstat (limited to 'toxcore')
-rw-r--r--toxcore/onion_client.c3
-rw-r--r--toxcore/tox.c2
2 files changed, 4 insertions, 1 deletions
diff --git a/toxcore/onion_client.c b/toxcore/onion_client.c
index ab7958c6..3b130602 100644
--- a/toxcore/onion_client.c
+++ b/toxcore/onion_client.c
@@ -1340,7 +1340,8 @@ int onion_isconnected(const Onion_Client *onion_c)
1340 1340
1341 for (i = 0; i < MAX_ONION_CLIENTS; ++i) { 1341 for (i = 0; i < MAX_ONION_CLIENTS; ++i) {
1342 if (!is_timeout(onion_c->clients_announce_list[i].timestamp, ONION_NODE_TIMEOUT)) 1342 if (!is_timeout(onion_c->clients_announce_list[i].timestamp, ONION_NODE_TIMEOUT))
1343 return 1; 1343 if (onion_c->clients_announce_list[i].is_stored)
1344 return 1;
1344 } 1345 }
1345 1346
1346 return 0; 1347 return 0;
diff --git a/toxcore/tox.c b/toxcore/tox.c
index c1851f06..a4413c4f 100644
--- a/toxcore/tox.c
+++ b/toxcore/tox.c
@@ -809,6 +809,7 @@ int tox_add_tcp_relay(Tox *tox, const char *address, uint16_t port, const uint8_
809{ 809{
810 Messenger *m = tox; 810 Messenger *m = tox;
811 IP_Port ip_port, ip_port_v4; 811 IP_Port ip_port, ip_port_v4;
812
812 if (!addr_parse_ip(address, &ip_port.ip)) { 813 if (!addr_parse_ip(address, &ip_port.ip)) {
813 if (m->options.udp_disabled) /* Disable DNS when udp is disabled. */ 814 if (m->options.udp_disabled) /* Disable DNS when udp is disabled. */
814 return 0; 815 return 0;
@@ -837,6 +838,7 @@ int tox_bootstrap_from_address(Tox *tox, const char *address, uint16_t port, con
837{ 838{
838 Messenger *m = tox; 839 Messenger *m = tox;
839 int ret = tox_add_tcp_relay(tox, address, port, public_key); 840 int ret = tox_add_tcp_relay(tox, address, port, public_key);
841
840 if (m->options.udp_disabled) { 842 if (m->options.udp_disabled) {
841 return ret; 843 return ret;
842 } else { /* DHT only works on UDP. */ 844 } else { /* DHT only works on UDP. */