diff --git a/toxcore/DHT.c b/toxcore/DHT.c index deb71864..734d7cb8 100644 --- a/toxcore/DHT.c +++ b/toxcore/DHT.c @@ -1628,26 +1628,6 @@ static int routeone_tofriend(DHT *dht, const uint8_t *friend_id, const uint8_t * return 0; } -/* Puts all the different ips returned by the nodes for a friend_id into array ip_portlist. - * ip_portlist must be at least MAX_FRIEND_CLIENTS big. - * - * return number of ips returned. - * return 0 if we are connected to friend or if no ips were found. - * return -1 if no such friend. - */ -int friend_ips(const DHT *dht, IP_Port *ip_portlist, const uint8_t *friend_id) -{ - uint32_t i; - - for (i = 0; i < dht->num_friends; ++i) { - /* Equal */ - if (id_equal(dht->friends_list[i].client_id, friend_id)) - return friend_iplist(dht, ip_portlist, i); - } - - return -1; -} - /*----------------------------------------------------------------------------------*/ /*---------------------BEGINNING OF NAT PUNCHING FUNCTIONS--------------------------*/ diff --git a/toxcore/DHT.h b/toxcore/DHT.h index 547f3887..47a828d7 100644 --- a/toxcore/DHT.h +++ b/toxcore/DHT.h @@ -375,16 +375,6 @@ int route_tofriend(const DHT *dht, const uint8_t *friend_id, const uint8_t *pack */ void cryptopacket_registerhandler(DHT *dht, uint8_t byte, cryptopacket_handler_callback cb, void *object); -/* NAT PUNCHING FUNCTIONS */ - -/* Puts all the different ips returned by the nodes for a friend_id into array ip_portlist. - * ip_portlist must be at least MAX_FRIEND_CLIENTS big. - * - * returns number of ips returned. - * returns -1 if no such friend. - */ -int friend_ips(const DHT *dht, IP_Port *ip_portlist, const uint8_t *friend_id); - /* SAVE/LOAD functions */ /* Get the size of the DHT (for saving). */