From 0f023d912c6dc5d8622ec3d88dbe953d5d26cfcb Mon Sep 17 00:00:00 2001 From: irungentoo Date: Fri, 29 Aug 2014 21:39:14 -0400 Subject: [PATCH] Removed useless code. --- toxcore/net_crypto.c | 5 +---- 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 return packet_num; } - conn->maximum_speed_reached = 0; - if (send_data_packet_helper(c, crypt_connection_id, conn->recv_array.buffer_start, packet_num, data, length) == 0) { Packet_Data *dt1 = NULL; get_data_pointer(&conn->send_array, &dt1, packet_num); @@ -2350,7 +2348,7 @@ static void send_crypto_packets(Net_Crypto *c) conn->packet_counter_set = temp_time; uint32_t packets_sent = conn->packets_sent; - conn->packets_sent = conn->packets_resent = 0; + conn->packets_sent = 0; /* conjestion control 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) if (ret != -1) { conn->packets_left -= ret; - conn->packets_resent += ret; } 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 { uint32_t last_sendqueue_size[CONGESTION_QUEUE_ARRAY_SIZE], last_sendqueue_counter; long signed int last_num_packets_sent[CONGESTION_QUEUE_ARRAY_SIZE]; - uint32_t packets_sent, packets_resent; + uint32_t packets_sent; uint8_t killed; /* set to 1 to kill the connection. */