consider number of retransmissions for delay calculation
authorChristian Grothoff <christian@grothoff.org>
Thu, 17 Nov 2011 14:54:42 +0000 (14:54 +0000)
committerChristian Grothoff <christian@grothoff.org>
Thu, 17 Nov 2011 14:54:42 +0000 (14:54 +0000)
src/fragmentation/fragmentation.c

index 3d8fc50bc4e99fb6a21d9027d8339a0d734daf67..5220840482d1d1201fbf51090bdd965d9102fe63 100644 (file)
@@ -205,14 +205,14 @@ transmit_next (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc)
   if (wrap)
   {
     /* full round transmitted wait 2x delay for ACK before going again */
+    fc->num_rounds++;
     delay =
         GNUNET_TIME_relative_max (GNUNET_TIME_relative_multiply (delay, 2),
-                                  fc->delay);
+                                  GNUNET_TIME_relative_multiply (fc->delay, fc->num_rounds);
     /* never use zero, need some time for ACK always */
     delay = GNUNET_TIME_relative_max (GNUNET_TIME_UNIT_MILLISECONDS, delay);
     fc->last_round = GNUNET_TIME_absolute_get ();
     fc->wack = GNUNET_YES;
-    fc->num_rounds++;
   }
   fc->proc_busy = GNUNET_YES;
   fc->delay_until = GNUNET_TIME_relative_to_absolute (delay);