aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2011-11-02 10:49:23 +0000
committerChristian Grothoff <christian@grothoff.org>2011-11-02 10:49:23 +0000
commit89fcd331339e3bc2c0ce62a7765dac3f39cfff2a (patch)
tree80fc072de3f6efa4d5a33c1b0250a7184d9895df
parent7940df8dd61410578dc149a724b1ffd680934ea3 (diff)
downloadgnunet-89fcd331339e3bc2c0ce62a7765dac3f39cfff2a.tar.gz
gnunet-89fcd331339e3bc2c0ce62a7765dac3f39cfff2a.zip
disable delays if infinite bandwidth
-rw-r--r--src/fragmentation/defragmentation.c2
-rw-r--r--src/fragmentation/fragmentation.c4
2 files changed, 6 insertions, 0 deletions
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,
536 { 536 {
537 delay = GNUNET_TIME_UNIT_ZERO; 537 delay = GNUNET_TIME_UNIT_ZERO;
538 } 538 }
539 if (NULL != getenv ("infinitebandwidth"))
540 delay = GNUNET_TIME_UNIT_ZERO;
539 if (GNUNET_SCHEDULER_NO_TASK != mc->ack_task) 541 if (GNUNET_SCHEDULER_NO_TASK != mc->ack_task)
540 GNUNET_SCHEDULER_cancel (mc->ack_task); 542 GNUNET_SCHEDULER_cancel (mc->ack_task);
541 mc->ack_task = GNUNET_SCHEDULER_add_delayed (delay, &send_ack, mc); 543 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)
160 delay = GNUNET_BANDWIDTH_tracker_get_delay (fc->tracker, fsize); 160 delay = GNUNET_BANDWIDTH_tracker_get_delay (fc->tracker, fsize);
161 else 161 else
162 delay = GNUNET_TIME_UNIT_ZERO; 162 delay = GNUNET_TIME_UNIT_ZERO;
163 if (NULL != getenv ("infinitebandwidth"))
164 delay = GNUNET_TIME_UNIT_ZERO;
163 if (delay.rel_value > 0) 165 if (delay.rel_value > 0)
164 { 166 {
165 fc->task = GNUNET_SCHEDULER_add_delayed (delay, &transmit_next, fc); 167 fc->task = GNUNET_SCHEDULER_add_delayed (delay, &transmit_next, fc);
@@ -208,6 +210,8 @@ transmit_next (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc)
208 fc->last_round = GNUNET_TIME_absolute_get (); 210 fc->last_round = GNUNET_TIME_absolute_get ();
209 fc->wack = GNUNET_YES; 211 fc->wack = GNUNET_YES;
210 } 212 }
213 if (NULL != getenv ("infinitebandwidth"))
214 delay = GNUNET_TIME_UNIT_ZERO;
211 fc->proc_busy = GNUNET_YES; 215 fc->proc_busy = GNUNET_YES;
212 fc->delay_until = GNUNET_TIME_relative_to_absolute (delay); 216 fc->delay_until = GNUNET_TIME_relative_to_absolute (delay);
213 fc->proc (fc->proc_cls, &fh->header); 217 fc->proc (fc->proc_cls, &fh->header);