aboutsummaryrefslogtreecommitdiff
path: root/src/service/transport/gnunet-service-transport.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/service/transport/gnunet-service-transport.c')
-rw-r--r--src/service/transport/gnunet-service-transport.c20
1 files changed, 17 insertions, 3 deletions
diff --git a/src/service/transport/gnunet-service-transport.c b/src/service/transport/gnunet-service-transport.c
index bc7364838..f37abaae0 100644
--- a/src/service/transport/gnunet-service-transport.c
+++ b/src/service/transport/gnunet-service-transport.c
@@ -9910,17 +9910,20 @@ static unsigned int
9910check_next_attempt_tree (struct PendingMessage *pm) 9910check_next_attempt_tree (struct PendingMessage *pm)
9911{ 9911{
9912 struct PendingMessage *pos; 9912 struct PendingMessage *pos;
9913 enum GNUNET_GenericReturnValue frags_in_flight_round;
9913 9914
9914 pos = pm->head_frag; 9915 pos = pm->head_frag;
9915 while (NULL != pos) 9916 while (NULL != pos)
9916 { 9917 {
9917 if (pos->frags_in_flight_round != pm->frags_in_flight_round || 9918 if (pos->frags_in_flight_round == pm->frags_in_flight_round ||
9918 GNUNET_YES == check_next_attempt_tree (pos)) 9919 GNUNET_YES == check_next_attempt_tree (pos))
9919 return GNUNET_YES; 9920 frags_in_flight_round = GNUNET_NO;
9921 else
9922 frags_in_flight_round = GNUNET_YES;
9920 pos = pos->next_frag; 9923 pos = pos->next_frag;
9921 } 9924 }
9922 9925
9923 return GNUNET_NO; 9926 return frags_in_flight_round;
9924} 9927}
9925 9928
9926 9929
@@ -9965,9 +9968,14 @@ update_pm_next_attempt (struct PendingMessage *pm,
9965 while (NULL != root->frag_parent && PMT_DV_BOX != root->pmt) 9968 while (NULL != root->frag_parent && PMT_DV_BOX != root->pmt)
9966 root = root->frag_parent; 9969 root = root->frag_parent;
9967 9970
9971 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
9972 "frag_count %u\n",
9973 root->frag_count);
9974
9968 if (GNUNET_NO == root->frags_in_flight) 9975 if (GNUNET_NO == root->frags_in_flight)
9969 { 9976 {
9970 root->next_attempt = next_attempt; 9977 root->next_attempt = next_attempt;
9978 root->frags_in_flight_round++;
9971 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, 9979 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
9972 "Next attempt for fragmented message <%" PRIu64 "> (<%" PRIu64 9980 "Next attempt for fragmented message <%" PRIu64 "> (<%" PRIu64
9973 ">)set to %" PRIu64 "\n", 9981 ">)set to %" PRIu64 "\n",
@@ -9991,6 +9999,8 @@ update_pm_next_attempt (struct PendingMessage *pm,
9991 ", reorder root! Next attempt is %" PRIu64 "\n", 9999 ", reorder root! Next attempt is %" PRIu64 "\n",
9992 root->logging_uuid, 10000 root->logging_uuid,
9993 root->next_attempt.abs_value_us); 10001 root->next_attempt.abs_value_us);
10002 if (PMT_DV_BOX == root->pmt)
10003 root = root->frag_parent;
9994 reorder_root_pm (root, root->next_attempt); 10004 reorder_root_pm (root, root->next_attempt);
9995 root->frag_count = 0; 10005 root->frag_count = 0;
9996 root->next_attempt = GNUNET_TIME_UNIT_ZERO_ABS; 10006 root->next_attempt = GNUNET_TIME_UNIT_ZERO_ABS;
@@ -10005,6 +10015,10 @@ update_pm_next_attempt (struct PendingMessage *pm,
10005 GNUNET_TIME_absolute_get_remaining (root->next_attempt); 10015 GNUNET_TIME_absolute_get_remaining (root->next_attempt);
10006 struct GNUNET_TIME_Relative plus = GNUNET_TIME_absolute_get_remaining ( 10016 struct GNUNET_TIME_Relative plus = GNUNET_TIME_absolute_get_remaining (
10007 next_attempt); 10017 next_attempt);
10018
10019 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
10020 "frag_count %u after factor\n",
10021 root->frag_count);
10008 s1 = GNUNET_TIME_relative_multiply_double (plus_mean, 10022 s1 = GNUNET_TIME_relative_multiply_double (plus_mean,
10009 factor); 10023 factor);
10010 s2 = GNUNET_TIME_relative_divide (plus, 10024 s2 = GNUNET_TIME_relative_divide (plus,