diff options
author | irungentoo <irungentoo@gmail.com> | 2014-01-17 13:35:40 -0500 |
---|---|---|
committer | irungentoo <irungentoo@gmail.com> | 2014-01-17 13:35:40 -0500 |
commit | cd2474a2f6d8a8831fcfb1f9f33e0192fa287842 (patch) | |
tree | 5e803fa071fd28daf16b99ff1c3d4e3a34240a50 /toxcore/net_crypto.c | |
parent | 9fcb707ec457b74f32ad48add5b93c0090c73f61 (diff) |
Incorporated onion into Tox.
Fixed a couple of issues related to that.
Diffstat (limited to 'toxcore/net_crypto.c')
-rw-r--r-- | toxcore/net_crypto.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/toxcore/net_crypto.c b/toxcore/net_crypto.c index a6c3ecd9..5c2691f3 100644 --- a/toxcore/net_crypto.c +++ b/toxcore/net_crypto.c | |||
@@ -365,11 +365,11 @@ static int cryptopacket_handle(void *object, IP_Port source, uint8_t *packet, ui | |||
365 | length > MAX_DATA_SIZE + crypto_box_MACBYTES) | 365 | length > MAX_DATA_SIZE + crypto_box_MACBYTES) |
366 | return 1; | 366 | return 1; |
367 | 367 | ||
368 | if (memcmp(packet + 1, dht->c->self_public_key, crypto_box_PUBLICKEYBYTES) == 0) { // Check if request is for us. | 368 | if (memcmp(packet + 1, dht->self_public_key, crypto_box_PUBLICKEYBYTES) == 0) { // Check if request is for us. |
369 | uint8_t public_key[crypto_box_PUBLICKEYBYTES]; | 369 | uint8_t public_key[crypto_box_PUBLICKEYBYTES]; |
370 | uint8_t data[MAX_DATA_SIZE]; | 370 | uint8_t data[MAX_DATA_SIZE]; |
371 | uint8_t number; | 371 | uint8_t number; |
372 | int len = handle_request(dht->c->self_public_key, dht->c->self_secret_key, public_key, data, &number, packet, length); | 372 | int len = handle_request(dht->self_public_key, dht->self_secret_key, public_key, data, &number, packet, length); |
373 | 373 | ||
374 | if (len == -1 || len == 0) | 374 | if (len == -1 || len == 0) |
375 | return 1; | 375 | return 1; |