summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorirungentoo <irungentoo@gmail.com>2015-01-02 22:40:53 -0500
committerirungentoo <irungentoo@gmail.com>2015-01-02 22:40:53 -0500
commitd4ea2809dbe7ef52ea44129750ba12438aa4d046 (patch)
treef2febae6a252397f4bd945e232acd89b69b9b481
parentc09b57549b37ec5f6c3165ced1518137223e1079 (diff)
Removed useless function.
-rw-r--r--toxcore/DHT.c20
-rw-r--r--toxcore/DHT.h10
2 files changed, 0 insertions, 30 deletions
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 *
1628 return 0; 1628 return 0;
1629} 1629}
1630 1630
1631/* Puts all the different ips returned by the nodes for a friend_id into array ip_portlist.
1632 * ip_portlist must be at least MAX_FRIEND_CLIENTS big.
1633 *
1634 * return number of ips returned.
1635 * return 0 if we are connected to friend or if no ips were found.
1636 * return -1 if no such friend.
1637 */
1638int friend_ips(const DHT *dht, IP_Port *ip_portlist, const uint8_t *friend_id)
1639{
1640 uint32_t i;
1641
1642 for (i = 0; i < dht->num_friends; ++i) {
1643 /* Equal */
1644 if (id_equal(dht->friends_list[i].client_id, friend_id))
1645 return friend_iplist(dht, ip_portlist, i);
1646 }
1647
1648 return -1;
1649}
1650
1651/*----------------------------------------------------------------------------------*/ 1631/*----------------------------------------------------------------------------------*/
1652/*---------------------BEGINNING OF NAT PUNCHING FUNCTIONS--------------------------*/ 1632/*---------------------BEGINNING OF NAT PUNCHING FUNCTIONS--------------------------*/
1653 1633
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
375 */ 375 */
376void cryptopacket_registerhandler(DHT *dht, uint8_t byte, cryptopacket_handler_callback cb, void *object); 376void cryptopacket_registerhandler(DHT *dht, uint8_t byte, cryptopacket_handler_callback cb, void *object);
377 377
378/* NAT PUNCHING FUNCTIONS */
379
380/* Puts all the different ips returned by the nodes for a friend_id into array ip_portlist.
381 * ip_portlist must be at least MAX_FRIEND_CLIENTS big.
382 *
383 * returns number of ips returned.
384 * returns -1 if no such friend.
385 */
386int friend_ips(const DHT *dht, IP_Port *ip_portlist, const uint8_t *friend_id);
387
388/* SAVE/LOAD functions */ 378/* SAVE/LOAD functions */
389 379
390/* Get the size of the DHT (for saving). */ 380/* Get the size of the DHT (for saving). */