diff options
author | Coren[m] <Break@Ocean> | 2013-09-13 19:44:14 +0200 |
---|---|---|
committer | Coren[m] <Break@Ocean> | 2013-09-13 19:44:14 +0200 |
commit | fa576e464e791199b4e9097bc835960f2dba5ea2 (patch) | |
tree | 205cd87b724b50406f2e44b9831dc834aded8b8c /toxcore/DHT.c | |
parent | e67a11dd04edce395c2d0ac403241ed08a875737 (diff) | |
parent | 339dcd60707ea7b46f5c450569d32f852a1c0be7 (diff) |
Merge remote-tracking branch 'upstream/master' into Integration
Diffstat (limited to 'toxcore/DHT.c')
-rw-r--r-- | toxcore/DHT.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/toxcore/DHT.c b/toxcore/DHT.c index 0b212d5b..085f93ed 100644 --- a/toxcore/DHT.c +++ b/toxcore/DHT.c | |||
@@ -527,7 +527,7 @@ static int getnodes(DHT *dht, IP_Port ip_port, uint8_t *public_key, uint8_t *cli | |||
527 | uint8_t plain[sizeof(ping_id) + CLIENT_ID_SIZE]; | 527 | uint8_t plain[sizeof(ping_id) + CLIENT_ID_SIZE]; |
528 | uint8_t encrypt[sizeof(ping_id) + CLIENT_ID_SIZE + ENCRYPTION_PADDING]; | 528 | uint8_t encrypt[sizeof(ping_id) + CLIENT_ID_SIZE + ENCRYPTION_PADDING]; |
529 | uint8_t nonce[crypto_box_NONCEBYTES]; | 529 | uint8_t nonce[crypto_box_NONCEBYTES]; |
530 | random_nonce(nonce); | 530 | new_nonce(nonce); |
531 | 531 | ||
532 | memcpy(plain, &ping_id, sizeof(ping_id)); | 532 | memcpy(plain, &ping_id, sizeof(ping_id)); |
533 | memcpy(plain + sizeof(ping_id), client_id, CLIENT_ID_SIZE); | 533 | memcpy(plain + sizeof(ping_id), client_id, CLIENT_ID_SIZE); |
@@ -572,7 +572,7 @@ static int sendnodes(DHT *dht, IP_Port ip_port, uint8_t *public_key, uint8_t *cl | |||
572 | uint8_t plain[sizeof(ping_id) + Node4_format_size * MAX_SENT_NODES]; | 572 | uint8_t plain[sizeof(ping_id) + Node4_format_size * MAX_SENT_NODES]; |
573 | uint8_t encrypt[sizeof(ping_id) + Node4_format_size * MAX_SENT_NODES + ENCRYPTION_PADDING]; | 573 | uint8_t encrypt[sizeof(ping_id) + Node4_format_size * MAX_SENT_NODES + ENCRYPTION_PADDING]; |
574 | uint8_t nonce[crypto_box_NONCEBYTES]; | 574 | uint8_t nonce[crypto_box_NONCEBYTES]; |
575 | random_nonce(nonce); | 575 | new_nonce(nonce); |
576 | 576 | ||
577 | memcpy(plain, &ping_id, sizeof(ping_id)); | 577 | memcpy(plain, &ping_id, sizeof(ping_id)); |
578 | #ifdef TOX_ENABLE_IPV6 | 578 | #ifdef TOX_ENABLE_IPV6 |