diff options
-rw-r--r-- | toxcore/onion_announce.c | 2 | ||||
-rw-r--r-- | toxcore/onion_client.c | 5 |
2 files changed, 6 insertions, 1 deletions
diff --git a/toxcore/onion_announce.c b/toxcore/onion_announce.c index da40584d..28e27d91 100644 --- a/toxcore/onion_announce.c +++ b/toxcore/onion_announce.c | |||
@@ -207,7 +207,7 @@ static int add_to_entries(Onion_Announce *onion_a, IP_Port ret_ip_port, uint8_t | |||
207 | 207 | ||
208 | memcpy(cmp_public_key, onion_a->dht->self_public_key, crypto_box_PUBLICKEYBYTES); | 208 | memcpy(cmp_public_key, onion_a->dht->self_public_key, crypto_box_PUBLICKEYBYTES); |
209 | qsort(onion_a->entries, ONION_ANNOUNCE_MAX_ENTRIES, sizeof(Onion_Announce_Entry), cmp_entry); | 209 | qsort(onion_a->entries, ONION_ANNOUNCE_MAX_ENTRIES, sizeof(Onion_Announce_Entry), cmp_entry); |
210 | return pos; | 210 | return in_entries(onion_a, public_key); |
211 | } | 211 | } |
212 | 212 | ||
213 | static int handle_announce_request(void *object, IP_Port source, uint8_t *packet, uint32_t length) | 213 | static int handle_announce_request(void *object, IP_Port source, uint8_t *packet, uint32_t length) |
diff --git a/toxcore/onion_client.c b/toxcore/onion_client.c index c03dfcea..b3c665b7 100644 --- a/toxcore/onion_client.c +++ b/toxcore/onion_client.c | |||
@@ -174,6 +174,11 @@ static int client_add_to_list(Onion_Client *onion_c, uint32_t num, uint8_t *publ | |||
174 | if (num == 0) { | 174 | if (num == 0) { |
175 | list_nodes = onion_c->clients_announce_list; | 175 | list_nodes = onion_c->clients_announce_list; |
176 | reference_id = onion_c->dht->c->self_public_key; | 176 | reference_id = onion_c->dht->c->self_public_key; |
177 | |||
178 | if (is_stored && memcmp(pingid_or_key, onion_c->temp_public_key, crypto_box_PUBLICKEYBYTES) != 0) { | ||
179 | is_stored = 0; | ||
180 | } | ||
181 | |||
177 | } else { | 182 | } else { |
178 | list_nodes = onion_c->friends_list[num - 1].clients_list; | 183 | list_nodes = onion_c->friends_list[num - 1].clients_list; |
179 | reference_id = onion_c->friends_list[num - 1].real_client_id; | 184 | reference_id = onion_c->friends_list[num - 1].real_client_id; |