From: Christian Grothoff Date: Wed, 2 Nov 2011 10:49:23 +0000 (+0000) Subject: disable delays if infinite bandwidth X-Git-Tag: initial-import-from-subversion-38251~16111 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=89fcd331339e3bc2c0ce62a7765dac3f39cfff2a;p=oweals%2Fgnunet.git disable delays if infinite bandwidth --- diff --git a/src/fragmentation/defragmentation.c b/src/fragmentation/defragmentation.c index b07f20407..d080f54da 100644 --- a/src/fragmentation/defragmentation.c +++ b/src/fragmentation/defragmentation.c @@ -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); diff --git a/src/fragmentation/fragmentation.c b/src/fragmentation/fragmentation.c index ef3a57a87..fc69b8a3a 100644 --- a/src/fragmentation/fragmentation.c +++ b/src/fragmentation/fragmentation.c @@ -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);