diff options
author | irungentoo <irungentoo@gmail.com> | 2013-09-21 09:33:44 -0400 |
---|---|---|
committer | irungentoo <irungentoo@gmail.com> | 2013-09-21 09:33:44 -0400 |
commit | a6abf007cbb62f0147dd136bffaa9197736b280f (patch) | |
tree | 99885ed191d5f6434ccf4c18a374e212293b3744 /toxcore/net_crypto.c | |
parent | 3e4599e33a1e65a369bf62caec443b9699b2aab4 (diff) |
Connection speed ups.
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 ca23957d..41c8c45c 100644 --- a/toxcore/net_crypto.c +++ b/toxcore/net_crypto.c | |||
@@ -516,7 +516,7 @@ int crypto_inbound(Net_Crypto *c, uint8_t *public_key, uint8_t *secret_nonce, ui | |||
516 | 516 | ||
517 | if (id_packet(c->lossless_udp, c->incoming_connections[i]) == 2) { | 517 | if (id_packet(c->lossless_udp, c->incoming_connections[i]) == 2) { |
518 | uint8_t temp_data[MAX_DATA_SIZE]; | 518 | uint8_t temp_data[MAX_DATA_SIZE]; |
519 | uint16_t len = read_packet(c->lossless_udp, c->incoming_connections[i], temp_data); | 519 | uint16_t len = read_packet_silent(c->lossless_udp, c->incoming_connections[i], temp_data); |
520 | 520 | ||
521 | if (handle_cryptohandshake(c, public_key, secret_nonce, session_key, temp_data, len)) { | 521 | if (handle_cryptohandshake(c, public_key, secret_nonce, session_key, temp_data, len)) { |
522 | int connection_id = c->incoming_connections[i]; | 522 | int connection_id = c->incoming_connections[i]; |
@@ -570,7 +570,7 @@ int accept_crypto_inbound(Net_Crypto *c, int connection_id, uint8_t *public_key, | |||
570 | { | 570 | { |
571 | uint32_t i; | 571 | uint32_t i; |
572 | 572 | ||
573 | if (connection_id == -1) | 573 | if (discard_packet(c->lossless_udp, connection_id) == -1) |
574 | return -1; | 574 | return -1; |
575 | 575 | ||
576 | /* | 576 | /* |