aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authort3sserakt <t3ss@posteo.de>2023-02-08 10:16:27 +0100
committert3sserakt <t3ss@posteo.de>2023-02-08 10:16:27 +0100
commita4b5e8d59bd8a607d5e26bc5ca1d9fab44c6e08a (patch)
tree8ccc4b8cab93ba72c32df793fa9b05756f47292b
parent1c5ed10388f201533f471970cca1f1c138340d36 (diff)
downloadgnunet-a4b5e8d59bd8a607d5e26bc5ca1d9fab44c6e08a.tar.gz
gnunet-a4b5e8d59bd8a607d5e26bc5ca1d9fab44c6e08a.zip
TNG: Fixed bug of not sending the changed window size, which takes into account the used and lost data.
-rw-r--r--src/transport/gnunet-service-tng.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/transport/gnunet-service-tng.c b/src/transport/gnunet-service-tng.c
index a1a46443e..c04e33624 100644
--- a/src/transport/gnunet-service-tng.c
+++ b/src/transport/gnunet-service-tng.c
@@ -5099,7 +5099,9 @@ consider_sending_fc (void *cls)
5099 fc.header.type = htons (GNUNET_MESSAGE_TYPE_TRANSPORT_FLOW_CONTROL); 5099 fc.header.type = htons (GNUNET_MESSAGE_TYPE_TRANSPORT_FLOW_CONTROL);
5100 fc.header.size = htons (sizeof(fc)); 5100 fc.header.size = htons (sizeof(fc));
5101 fc.seq = htonl (vl->fc_seq_gen++); 5101 fc.seq = htonl (vl->fc_seq_gen++);
5102 fc.inbound_window_size = GNUNET_htonll (vl->incoming_fc_window_size); 5102 fc.inbound_window_size = GNUNET_htonll (vl->incoming_fc_window_size +
5103 vl->incoming_fc_window_size_used +
5104 vl->incoming_fc_window_size_loss);
5103 fc.outbound_sent = GNUNET_htonll (vl->outbound_fc_window_size_used); 5105 fc.outbound_sent = GNUNET_htonll (vl->outbound_fc_window_size_used);
5104 fc.outbound_window_size = GNUNET_htonll (vl->outbound_fc_window_size); 5106 fc.outbound_window_size = GNUNET_htonll (vl->outbound_fc_window_size);
5105 fc.sender_time = GNUNET_TIME_absolute_hton (monotime); 5107 fc.sender_time = GNUNET_TIME_absolute_hton (monotime);