diff options
Diffstat (limited to 'toxcore/net_crypto.c')
-rw-r--r-- | toxcore/net_crypto.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/toxcore/net_crypto.c b/toxcore/net_crypto.c index 43cc8ab1..b1473632 100644 --- a/toxcore/net_crypto.c +++ b/toxcore/net_crypto.c | |||
@@ -1119,7 +1119,7 @@ static int reset_max_speed_reached(Net_Crypto *c, int crypt_connection_id) | |||
1119 | } | 1119 | } |
1120 | 1120 | ||
1121 | /* If last packet send failed, try to send packet again. | 1121 | /* If last packet send failed, try to send packet again. |
1122 | If sending it fails we won't be able to send the new packet. */ | 1122 | * If sending it fails we won't be able to send the new packet. */ |
1123 | if (conn->maximum_speed_reached) { | 1123 | if (conn->maximum_speed_reached) { |
1124 | Packet_Data *dt = nullptr; | 1124 | Packet_Data *dt = nullptr; |
1125 | const uint32_t packet_num = conn->send_array.buffer_end - 1; | 1125 | const uint32_t packet_num = conn->send_array.buffer_end - 1; |
@@ -1157,7 +1157,7 @@ static int64_t send_lossless_packet(Net_Crypto *c, int crypt_connection_id, cons | |||
1157 | } | 1157 | } |
1158 | 1158 | ||
1159 | /* If last packet send failed, try to send packet again. | 1159 | /* If last packet send failed, try to send packet again. |
1160 | If sending it fails we won't be able to send the new packet. */ | 1160 | * If sending it fails we won't be able to send the new packet. */ |
1161 | reset_max_speed_reached(c, crypt_connection_id); | 1161 | reset_max_speed_reached(c, crypt_connection_id); |
1162 | 1162 | ||
1163 | if (conn->maximum_speed_reached && congestion_control) { | 1163 | if (conn->maximum_speed_reached && congestion_control) { |
@@ -2480,7 +2480,7 @@ static int udp_handle_packet(void *object, IP_Port source, const uint8_t *packet | |||
2480 | } | 2480 | } |
2481 | 2481 | ||
2482 | /* The dT for the average packet receiving rate calculations. | 2482 | /* The dT for the average packet receiving rate calculations. |
2483 | Also used as the */ | 2483 | * Also used as the */ |
2484 | #define PACKET_COUNTER_AVERAGE_INTERVAL 50 | 2484 | #define PACKET_COUNTER_AVERAGE_INTERVAL 50 |
2485 | 2485 | ||
2486 | /* Ratio of recv queue size / recv packet rate (in seconds) times | 2486 | /* Ratio of recv queue size / recv packet rate (in seconds) times |
@@ -2566,7 +2566,7 @@ static void send_crypto_packets(Net_Crypto *c) | |||
2566 | conn->packets_resent = 0; | 2566 | conn->packets_resent = 0; |
2567 | 2567 | ||
2568 | /* conjestion control | 2568 | /* conjestion control |
2569 | calculate a new value of conn->packet_send_rate based on some data | 2569 | * calculate a new value of conn->packet_send_rate based on some data |
2570 | */ | 2570 | */ |
2571 | 2571 | ||
2572 | unsigned int pos = conn->last_sendqueue_counter % CONGESTION_QUEUE_ARRAY_SIZE; | 2572 | unsigned int pos = conn->last_sendqueue_counter % CONGESTION_QUEUE_ARRAY_SIZE; |