diff options
author | notsecure <notsecure@marek.ca> | 2014-05-22 20:19:19 -0400 |
---|---|---|
committer | notsecure <notsecure@marek.ca> | 2014-05-26 13:33:19 -0400 |
commit | 5346af8067fb86c678eb1ac88f5ea949b83f5dfc (patch) | |
tree | 18e303787ad25039fcb89ede69f15101709e8f4e | |
parent | e3bc591b3b52a64d8dc47f0f02185577e729ff54 (diff) |
file transfer fixes
-removed rate limit
-send rate no longer gets reset on local/LAN connections
-rw-r--r-- | toxcore/net_crypto.c | 9 |
1 files changed, 3 insertions, 6 deletions
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) | |||
2257 | conn->packet_send_rate = CRYPTO_PACKET_MIN_RATE; | 2257 | conn->packet_send_rate = CRYPTO_PACKET_MIN_RATE; |
2258 | } | 2258 | } |
2259 | 2259 | ||
2260 | if (conn->packet_send_rate > CRYPTO_PACKET_BUFFER_SIZE * 2) | 2260 | if (conn->sending != 0 && num_packets_array(&conn->send_array) < CRYPTO_MIN_QUEUE_LENGTH / 2) { |
2261 | conn->packet_send_rate = CRYPTO_PACKET_BUFFER_SIZE * 2; | 2261 | --conn->sending; |
2262 | } | ||
2262 | 2263 | ||
2263 | } | 2264 | } |
2264 | 2265 | ||
@@ -2285,10 +2286,6 @@ static void send_crypto_packets(Net_Crypto *c) | |||
2285 | conn->packets_resent += ret; | 2286 | conn->packets_resent += ret; |
2286 | conn->packets_left -= ret; | 2287 | conn->packets_left -= ret; |
2287 | } | 2288 | } |
2288 | |||
2289 | if (conn->sending != 0 && num_packets_array(&conn->send_array) < CRYPTO_MIN_QUEUE_LENGTH / 2) { | ||
2290 | --conn->sending; | ||
2291 | } | ||
2292 | } | 2289 | } |
2293 | } | 2290 | } |
2294 | } | 2291 | } |