[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[gnunet] 02/05: Transport: Introduced variable to count the round of fra
From: |
gnunet |
Subject: |
[gnunet] 02/05: Transport: Introduced variable to count the round of fragments of a message being (re)send. |
Date: |
Fri, 15 Dec 2023 10:53:26 +0100 |
This is an automated email from the git hooks/post-receive script.
t3sserakt pushed a commit to branch master
in repository gnunet.
commit 26b05be15dd510603204c33c948753cf14627ae8
Author: t3sserakt <t3ss@posteo.de>
AuthorDate: Fri Dec 15 10:41:03 2023 +0100
Transport: Introduced variable to count the round of fragments of a message
being (re)send.
---
src/service/transport/gnunet-service-transport.c | 18 +++++++++++-------
1 file changed, 11 insertions(+), 7 deletions(-)
diff --git a/src/service/transport/gnunet-service-transport.c
b/src/service/transport/gnunet-service-transport.c
index 88bea3cb5..5f1ddec66 100644
--- a/src/service/transport/gnunet-service-transport.c
+++ b/src/service/transport/gnunet-service-transport.c
@@ -2291,6 +2291,11 @@ struct PendingMessage
*/
uint32_t frags_in_flight;
+ /**
+ * The round we are (re)-sending fragments.
+ */
+ uint32_t frags_in_flight_round;
+
/**
* How many fragments do we have?
**/
@@ -9672,16 +9677,15 @@ reorder_root_pm (struct PendingMessage *pm,
static unsigned int
-check_next_attempt_tree (struct PendingMessage *pm,
- struct GNUNET_TIME_Absolute next_attempt)
+check_next_attempt_tree (struct PendingMessage *pm)
{
struct PendingMessage *pos;
pos = pm->head_frag;
while (NULL != pos)
{
- if (pos->next_attempt.abs_value_us != next_attempt.abs_value_us ||
- GNUNET_YES == check_next_attempt_tree (pos, next_attempt))
+ if (pos->frags_in_flight_round != pm->frags_in_flight_round ||
+ GNUNET_YES == check_next_attempt_tree (pos))
return GNUNET_YES;
pos = pos->next_frag;
}
@@ -9743,10 +9747,10 @@ update_pm_next_attempt (struct PendingMessage *pm,
}
pm->next_attempt = root->next_attempt;
+ pm->frags_in_flight_round = root->frags_in_flight_round;
if (root->bytes_msg == root->frag_off)
- root->frags_in_flight = check_next_attempt_tree (root,
- root->next_attempt);
+ root->frags_in_flight = check_next_attempt_tree (root);
else
root->frags_in_flight = GNUNET_YES;
@@ -10311,7 +10315,7 @@ transmit_on_queue (void *cls)
wait_duration, wait_multiplier);
GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
"Waiting %s for ACK until %s\n",
- GNUNET_STRINGS_relative_time_to_string (plus, GNUNET_YES),
+ GNUNET_STRINGS_relative_time_to_string (plus, GNUNET_NO),
GNUNET_STRINGS_absolute_time_to_string (next));
update_pm_next_attempt (pm,
GNUNET_TIME_relative_to_absolute (
--
To stop receiving notification emails like this one, please contact
gnunet@gnunet.org.