diff options
author | irungentoo <irungentoo@gmail.com> | 2015-06-27 23:37:11 -0400 |
---|---|---|
committer | irungentoo <irungentoo@gmail.com> | 2015-06-27 23:37:11 -0400 |
commit | b8362a6726c49ae53fa08846739f354b7b75ee13 (patch) | |
tree | aadff0d934f4fc26a4106d8113eef95bb7305f58 /toxcore | |
parent | 0e982405d6ace103d896e690777ea5ab00bf113e (diff) |
Removed some comented out code.
Diffstat (limited to 'toxcore')
-rw-r--r-- | toxcore/DHT.c | 26 |
1 files changed, 0 insertions, 26 deletions
diff --git a/toxcore/DHT.c b/toxcore/DHT.c index 82c40136..0695fa59 100644 --- a/toxcore/DHT.c +++ b/toxcore/DHT.c | |||
@@ -1141,30 +1141,6 @@ static int handle_sendnodes_ipv6(void *object, IP_Port source, const uint8_t *pa | |||
1141 | /*----------------------------------------------------------------------------------*/ | 1141 | /*----------------------------------------------------------------------------------*/ |
1142 | /*------------------------END of packet handling functions--------------------------*/ | 1142 | /*------------------------END of packet handling functions--------------------------*/ |
1143 | 1143 | ||
1144 | /* | ||
1145 | * Send get nodes requests with client_id to max_num peers in list of length length | ||
1146 | */ | ||
1147 | /* | ||
1148 | static void get_bunchnodes(DHT *dht, Client_data *list, uint16_t length, uint16_t max_num, uint8_t *client_id) | ||
1149 | { | ||
1150 | uint32_t i, num = 0; | ||
1151 | |||
1152 | for (i = 0; i < length; ++i) { | ||
1153 | IPPTsPng *assoc; | ||
1154 | uint32_t a; | ||
1155 | |||
1156 | for (a = 0, assoc = &list[i].assoc6; a < 2; a++, assoc = &list[i].assoc4) | ||
1157 | if (ipport_isset(&(assoc->ip_port)) && | ||
1158 | !is_timeout(assoc->ret_timestamp, BAD_NODE_TIMEOUT)) { | ||
1159 | getnodes(dht, assoc->ip_port, list[i].client_id, client_id, NULL); | ||
1160 | ++num; | ||
1161 | |||
1162 | if (num >= max_num) | ||
1163 | return; | ||
1164 | } | ||
1165 | } | ||
1166 | } | ||
1167 | */ | ||
1168 | int DHT_addfriend(DHT *dht, const uint8_t *client_id, void (*ip_callback)(void *data, int32_t number, IP_Port), | 1144 | int DHT_addfriend(DHT *dht, const uint8_t *client_id, void (*ip_callback)(void *data, int32_t number, IP_Port), |
1169 | void *data, int32_t number, uint16_t *lock_count) | 1145 | void *data, int32_t number, uint16_t *lock_count) |
1170 | { | 1146 | { |
@@ -1244,8 +1220,6 @@ int DHT_addfriend(DHT *dht, const uint8_t *client_id, void (*ip_callback)(void * | |||
1244 | } | 1220 | } |
1245 | 1221 | ||
1246 | #endif | 1222 | #endif |
1247 | /*this isn't really useful anymore. | ||
1248 | get_bunchnodes(dht, dht->close_clientlist, LCLIENT_LIST, MAX_FRIEND_CLIENTS, client_id);*/ | ||
1249 | 1223 | ||
1250 | return 0; | 1224 | return 0; |
1251 | } | 1225 | } |