From 5346af8067fb86c678eb1ac88f5ea949b83f5dfc Mon Sep 17 00:00:00 2001 From: notsecure Date: Thu, 22 May 2014 20:19:19 -0400 Subject: file transfer fixes -removed rate limit -send rate no longer gets reset on local/LAN connections --- toxcore/net_crypto.c | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) (limited to 'toxcore/net_crypto.c') diff --git a/toxcore/net_crypto.c b/toxcore/net_crypto.c index 3dd8f885..56d7c7b6 100644 --- a/toxcore/net_crypto.c +++ b/toxcore/net_crypto.c @@ -2257,8 +2257,9 @@ static void send_crypto_packets(Net_Crypto *c) conn->packet_send_rate = CRYPTO_PACKET_MIN_RATE; } - if (conn->packet_send_rate > CRYPTO_PACKET_BUFFER_SIZE * 2) - conn->packet_send_rate = CRYPTO_PACKET_BUFFER_SIZE * 2; + if (conn->sending != 0 && num_packets_array(&conn->send_array) < CRYPTO_MIN_QUEUE_LENGTH / 2) { + --conn->sending; + } } @@ -2285,10 +2286,6 @@ static void send_crypto_packets(Net_Crypto *c) conn->packets_resent += ret; conn->packets_left -= ret; } - - if (conn->sending != 0 && num_packets_array(&conn->send_array) < CRYPTO_MIN_QUEUE_LENGTH / 2) { - --conn->sending; - } } } } -- cgit v1.2.3