diff options
Diffstat (limited to 'toxcore')
-rw-r--r-- | toxcore/net_crypto.c | 5 | ||||
-rw-r--r-- | toxcore/net_crypto.h | 2 |
2 files changed, 2 insertions, 5 deletions
diff --git a/toxcore/net_crypto.c b/toxcore/net_crypto.c index d975a356..ef3a52e7 100644 --- a/toxcore/net_crypto.c +++ b/toxcore/net_crypto.c | |||
@@ -832,8 +832,6 @@ static int64_t send_lossless_packet(Net_Crypto *c, int crypt_connection_id, cons | |||
832 | return packet_num; | 832 | return packet_num; |
833 | } | 833 | } |
834 | 834 | ||
835 | conn->maximum_speed_reached = 0; | ||
836 | |||
837 | if (send_data_packet_helper(c, crypt_connection_id, conn->recv_array.buffer_start, packet_num, data, length) == 0) { | 835 | if (send_data_packet_helper(c, crypt_connection_id, conn->recv_array.buffer_start, packet_num, data, length) == 0) { |
838 | Packet_Data *dt1 = NULL; | 836 | Packet_Data *dt1 = NULL; |
839 | get_data_pointer(&conn->send_array, &dt1, packet_num); | 837 | get_data_pointer(&conn->send_array, &dt1, packet_num); |
@@ -2350,7 +2348,7 @@ static void send_crypto_packets(Net_Crypto *c) | |||
2350 | conn->packet_counter_set = temp_time; | 2348 | conn->packet_counter_set = temp_time; |
2351 | 2349 | ||
2352 | uint32_t packets_sent = conn->packets_sent; | 2350 | uint32_t packets_sent = conn->packets_sent; |
2353 | conn->packets_sent = conn->packets_resent = 0; | 2351 | conn->packets_sent = 0; |
2354 | 2352 | ||
2355 | /* conjestion control | 2353 | /* conjestion control |
2356 | calculate a new value of conn->packet_send_rate based on some data | 2354 | calculate a new value of conn->packet_send_rate based on some data |
@@ -2404,7 +2402,6 @@ static void send_crypto_packets(Net_Crypto *c) | |||
2404 | 2402 | ||
2405 | if (ret != -1) { | 2403 | if (ret != -1) { |
2406 | conn->packets_left -= ret; | 2404 | conn->packets_left -= ret; |
2407 | conn->packets_resent += ret; | ||
2408 | } | 2405 | } |
2409 | 2406 | ||
2410 | if (conn->packet_send_rate > CRYPTO_PACKET_MIN_RATE * 1.5) { | 2407 | if (conn->packet_send_rate > CRYPTO_PACKET_MIN_RATE * 1.5) { |
diff --git a/toxcore/net_crypto.h b/toxcore/net_crypto.h index 60d908e1..054bcbb1 100644 --- a/toxcore/net_crypto.h +++ b/toxcore/net_crypto.h | |||
@@ -148,7 +148,7 @@ typedef struct { | |||
148 | 148 | ||
149 | uint32_t last_sendqueue_size[CONGESTION_QUEUE_ARRAY_SIZE], last_sendqueue_counter; | 149 | uint32_t last_sendqueue_size[CONGESTION_QUEUE_ARRAY_SIZE], last_sendqueue_counter; |
150 | long signed int last_num_packets_sent[CONGESTION_QUEUE_ARRAY_SIZE]; | 150 | long signed int last_num_packets_sent[CONGESTION_QUEUE_ARRAY_SIZE]; |
151 | uint32_t packets_sent, packets_resent; | 151 | uint32_t packets_sent; |
152 | 152 | ||
153 | uint8_t killed; /* set to 1 to kill the connection. */ | 153 | uint8_t killed; /* set to 1 to kill the connection. */ |
154 | 154 | ||