disable delays if infinite bandwidth
authorChristian Grothoff <christian@grothoff.org>
Wed, 2 Nov 2011 10:49:23 +0000 (10:49 +0000)
committerChristian Grothoff <christian@grothoff.org>
Wed, 2 Nov 2011 10:49:23 +0000 (10:49 +0000)
src/fragmentation/defragmentation.c
src/fragmentation/fragmentation.c

index b07f2040772819249b9f137683cb00940adb0a23..d080f54da5b244c1b0e0e8c0639ae404fa828cfb 100644 (file)
@@ -536,6 +536,8 @@ GNUNET_DEFRAGMENT_process_fragment (struct GNUNET_DEFRAGMENT_Context *dc,
   {
     delay = GNUNET_TIME_UNIT_ZERO;
   }
+  if (NULL != getenv ("infinitebandwidth"))
+    delay = GNUNET_TIME_UNIT_ZERO;
   if (GNUNET_SCHEDULER_NO_TASK != mc->ack_task)
     GNUNET_SCHEDULER_cancel (mc->ack_task);
   mc->ack_task = GNUNET_SCHEDULER_add_delayed (delay, &send_ack, mc);
index ef3a57a87b618f7f4f670f88e6c85b3dfcf7b99b..fc69b8a3afd83d984f2603bafa47338d5f06a62a 100644 (file)
@@ -160,6 +160,8 @@ transmit_next (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc)
     delay = GNUNET_BANDWIDTH_tracker_get_delay (fc->tracker, fsize);
   else
     delay = GNUNET_TIME_UNIT_ZERO;
+  if (NULL != getenv ("infinitebandwidth"))
+    delay = GNUNET_TIME_UNIT_ZERO;
   if (delay.rel_value > 0)
   {
     fc->task = GNUNET_SCHEDULER_add_delayed (delay, &transmit_next, fc);
@@ -208,6 +210,8 @@ transmit_next (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc)
     fc->last_round = GNUNET_TIME_absolute_get ();
     fc->wack = GNUNET_YES;
   }
+  if (NULL != getenv ("infinitebandwidth"))
+    delay = GNUNET_TIME_UNIT_ZERO;
   fc->proc_busy = GNUNET_YES;
   fc->delay_until = GNUNET_TIME_relative_to_absolute (delay);
   fc->proc (fc->proc_cls, &fh->header);