Fixed DHT bug.

This commit is contained in:
irungentoo 2015-12-08 16:50:18 -05:00
parent 73b2bce08a
commit 4f33b27f6b
No known key found for this signature in database
GPG Key ID: 10349DC9BED89E98

View File

@ -748,14 +748,14 @@ static int replace_all( Client_data *list,
*/
static unsigned int ping_node_from_getnodes_ok(DHT *dht, const uint8_t *public_key)
{
if (store_node_ok(&dht->close_clientlist[0], public_key, dht->self_public_key)) {
if (store_node_ok(&dht->close_clientlist[1], public_key, dht->self_public_key)) {
return 1;
}
unsigned int i;
for (i = 0; i < dht->num_friends; ++i) {
if (store_node_ok(&dht->friends_list[i].client_list[0], public_key, dht->self_public_key)) {
if (store_node_ok(&dht->friends_list[i].client_list[1], public_key, dht->self_public_key)) {
return 1;
}
}