aboutsummaryrefslogtreecommitdiff
path: root/src/fragmentation/fragmentation.c
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2011-11-17 14:54:42 +0000
committerChristian Grothoff <christian@grothoff.org>2011-11-17 14:54:42 +0000
commit4c281c84a30b4b6c800451e452abec2bf9626634 (patch)
tree33ee6e79a8a1a75bf67e5cee168e1fa868c58a86 /src/fragmentation/fragmentation.c
parentb11751fa943c1d4659c24e8bf558dc86213f5998 (diff)
downloadgnunet-4c281c84a30b4b6c800451e452abec2bf9626634.tar.gz
gnunet-4c281c84a30b4b6c800451e452abec2bf9626634.zip
consider number of retransmissions for delay calculation
Diffstat (limited to 'src/fragmentation/fragmentation.c')
-rw-r--r--src/fragmentation/fragmentation.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/fragmentation/fragmentation.c b/src/fragmentation/fragmentation.c
index 3d8fc50bc..522084048 100644
--- a/src/fragmentation/fragmentation.c
+++ b/src/fragmentation/fragmentation.c
@@ -205,14 +205,14 @@ transmit_next (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc)
205 if (wrap) 205 if (wrap)
206 { 206 {
207 /* full round transmitted wait 2x delay for ACK before going again */ 207 /* full round transmitted wait 2x delay for ACK before going again */
208 fc->num_rounds++;
208 delay = 209 delay =
209 GNUNET_TIME_relative_max (GNUNET_TIME_relative_multiply (delay, 2), 210 GNUNET_TIME_relative_max (GNUNET_TIME_relative_multiply (delay, 2),
210 fc->delay); 211 GNUNET_TIME_relative_multiply (fc->delay, fc->num_rounds);
211 /* never use zero, need some time for ACK always */ 212 /* never use zero, need some time for ACK always */
212 delay = GNUNET_TIME_relative_max (GNUNET_TIME_UNIT_MILLISECONDS, delay); 213 delay = GNUNET_TIME_relative_max (GNUNET_TIME_UNIT_MILLISECONDS, delay);
213 fc->last_round = GNUNET_TIME_absolute_get (); 214 fc->last_round = GNUNET_TIME_absolute_get ();
214 fc->wack = GNUNET_YES; 215 fc->wack = GNUNET_YES;
215 fc->num_rounds++;
216 } 216 }
217 fc->proc_busy = GNUNET_YES; 217 fc->proc_busy = GNUNET_YES;
218 fc->delay_until = GNUNET_TIME_relative_to_absolute (delay); 218 fc->delay_until = GNUNET_TIME_relative_to_absolute (delay);