diff options
Diffstat (limited to 'toxcore/net_crypto.c')
-rw-r--r-- | toxcore/net_crypto.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/toxcore/net_crypto.c b/toxcore/net_crypto.c index f0d701fe..fbdbaab8 100644 --- a/toxcore/net_crypto.c +++ b/toxcore/net_crypto.c | |||
@@ -2517,7 +2517,6 @@ static void send_crypto_packets(Net_Crypto *c) | |||
2517 | conn->last_sendqueue_size[pos] = num_packets_array(&conn->send_array); | 2517 | conn->last_sendqueue_size[pos] = num_packets_array(&conn->send_array); |
2518 | ++conn->last_sendqueue_counter; | 2518 | ++conn->last_sendqueue_counter; |
2519 | 2519 | ||
2520 | unsigned int j; | ||
2521 | long signed int sum = 0; | 2520 | long signed int sum = 0; |
2522 | sum = (long signed int)conn->last_sendqueue_size[(pos) % CONGESTION_QUEUE_ARRAY_SIZE] - | 2521 | sum = (long signed int)conn->last_sendqueue_size[(pos) % CONGESTION_QUEUE_ARRAY_SIZE] - |
2523 | (long signed int)conn->last_sendqueue_size[(pos - (CONGESTION_QUEUE_ARRAY_SIZE - 1)) % CONGESTION_QUEUE_ARRAY_SIZE]; | 2522 | (long signed int)conn->last_sendqueue_size[(pos - (CONGESTION_QUEUE_ARRAY_SIZE - 1)) % CONGESTION_QUEUE_ARRAY_SIZE]; |
@@ -2542,7 +2541,7 @@ static void send_crypto_packets(Net_Crypto *c) | |||
2542 | delay = packets_set_rem_array; | 2541 | delay = packets_set_rem_array; |
2543 | } | 2542 | } |
2544 | 2543 | ||
2545 | for (j = 0; j < CONGESTION_QUEUE_ARRAY_SIZE; ++j) { | 2544 | for (unsigned j = 0; j < CONGESTION_QUEUE_ARRAY_SIZE; ++j) { |
2546 | unsigned int ind = (j + (packets_set_rem_array - delay) + n_p_pos) % CONGESTION_LAST_SENT_ARRAY_SIZE; | 2545 | unsigned int ind = (j + (packets_set_rem_array - delay) + n_p_pos) % CONGESTION_LAST_SENT_ARRAY_SIZE; |
2547 | total_sent += conn->last_num_packets_sent[ind]; | 2546 | total_sent += conn->last_num_packets_sent[ind]; |
2548 | total_resent += conn->last_num_packets_resent[ind]; | 2547 | total_resent += conn->last_num_packets_resent[ind]; |