From a4b5e8d59bd8a607d5e26bc5ca1d9fab44c6e08a Mon Sep 17 00:00:00 2001 From: t3sserakt Date: Wed, 8 Feb 2023 10:16:27 +0100 Subject: TNG: Fixed bug of not sending the changed window size, which takes into account the used and lost data. --- src/transport/gnunet-service-tng.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'src') 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) fc.header.type = htons (GNUNET_MESSAGE_TYPE_TRANSPORT_FLOW_CONTROL); fc.header.size = htons (sizeof(fc)); fc.seq = htonl (vl->fc_seq_gen++); - fc.inbound_window_size = GNUNET_htonll (vl->incoming_fc_window_size); + fc.inbound_window_size = GNUNET_htonll (vl->incoming_fc_window_size + + vl->incoming_fc_window_size_used + + vl->incoming_fc_window_size_loss); fc.outbound_sent = GNUNET_htonll (vl->outbound_fc_window_size_used); fc.outbound_window_size = GNUNET_htonll (vl->outbound_fc_window_size); fc.sender_time = GNUNET_TIME_absolute_hton (monotime); -- cgit v1.2.3