summaryrefslogtreecommitdiff
path: root/toxcore/friend_connection.c
diff options
context:
space:
mode:
Diffstat (limited to 'toxcore/friend_connection.c')
-rw-r--r--toxcore/friend_connection.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/toxcore/friend_connection.c b/toxcore/friend_connection.c
index 41fef426..2ebc0d9b 100644
--- a/toxcore/friend_connection.c
+++ b/toxcore/friend_connection.c
@@ -229,7 +229,7 @@ int friend_add_tcp_relay(Friend_Connections *fr_c, int friendcon_id, IP_Port ip_
229 } 229 }
230 230
231 /* Local ip and same pk means that they are hosting a TCP relay. */ 231 /* Local ip and same pk means that they are hosting a TCP relay. */
232 if (Local_ip(ip_port.ip) && public_key_cmp(friend_con->dht_temp_pk, public_key) == 0) { 232 if (ip_is_local(ip_port.ip) && public_key_cmp(friend_con->dht_temp_pk, public_key) == 0) {
233 if (friend_con->dht_ip_port.ip.family != 0) { 233 if (friend_con->dht_ip_port.ip.family != 0) {
234 ip_port.ip = friend_con->dht_ip_port.ip; 234 ip_port.ip = friend_con->dht_ip_port.ip;
235 } else { 235 } else {
@@ -892,7 +892,7 @@ Friend_Connections *new_friend_connections(Onion_Client *onion_c, bool local_dis
892 new_connection_handler(temp->net_crypto, &handle_new_connections, temp); 892 new_connection_handler(temp->net_crypto, &handle_new_connections, temp);
893 893
894 if (temp->local_discovery_enabled) { 894 if (temp->local_discovery_enabled) {
895 LANdiscovery_init(temp->dht); 895 lan_discovery_init(temp->dht);
896 } 896 }
897 897
898 return temp; 898 return temp;
@@ -907,11 +907,11 @@ static void LANdiscovery(Friend_Connections *fr_c)
907 last = last > TOX_PORTRANGE_TO ? TOX_PORTRANGE_TO : last; 907 last = last > TOX_PORTRANGE_TO ? TOX_PORTRANGE_TO : last;
908 908
909 // Always send to default port 909 // Always send to default port
910 send_LANdiscovery(net_htons(TOX_PORT_DEFAULT), fr_c->dht); 910 lan_discovery_send(net_htons(TOX_PORT_DEFAULT), fr_c->dht);
911 911
912 // And check some extra ports 912 // And check some extra ports
913 for (uint16_t port = first; port < last; port++) { 913 for (uint16_t port = first; port < last; port++) {
914 send_LANdiscovery(net_htons(port), fr_c->dht); 914 lan_discovery_send(net_htons(port), fr_c->dht);
915 } 915 }
916 916
917 // Don't include default port in port range 917 // Don't include default port in port range
@@ -987,7 +987,7 @@ void kill_friend_connections(Friend_Connections *fr_c)
987 } 987 }
988 988
989 if (fr_c->local_discovery_enabled) { 989 if (fr_c->local_discovery_enabled) {
990 LANdiscovery_kill(fr_c->dht); 990 lan_discovery_kill(fr_c->dht);
991 } 991 }
992 992
993 free(fr_c); 993 free(fr_c);