aboutsummaryrefslogtreecommitdiff
path: root/src/fragmentation/fragmentation.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/fragmentation/fragmentation.c')
-rw-r--r--src/fragmentation/fragmentation.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/fragmentation/fragmentation.c b/src/fragmentation/fragmentation.c
index 39a5af814..bf7491815 100644
--- a/src/fragmentation/fragmentation.c
+++ b/src/fragmentation/fragmentation.c
@@ -231,7 +231,7 @@ transmit_next (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc)
231 fc->num_rounds++; 231 fc->num_rounds++;
232 delay = GNUNET_TIME_relative_multiply (fc->ack_delay, 2); 232 delay = GNUNET_TIME_relative_multiply (fc->ack_delay, 2);
233 /* never use zero, need some time for ACK always */ 233 /* never use zero, need some time for ACK always */
234 delay = GNUNET_TIME_relative_max (MIN_ACK_DELAY, delay); 234 delay = GNUNET_TIME_relative_max (MIN_ACK_DELAY, delay);
235 fc->wack = GNUNET_YES; 235 fc->wack = GNUNET_YES;
236 fc->last_round = GNUNET_TIME_absolute_get (); 236 fc->last_round = GNUNET_TIME_absolute_get ();
237 GNUNET_STATISTICS_update (fc->stats, _("# fragments wrap arounds"), 1, 237 GNUNET_STATISTICS_update (fc->stats, _("# fragments wrap arounds"), 1,
@@ -277,7 +277,7 @@ GNUNET_FRAGMENT_context_create (struct GNUNET_STATISTICS_Handle *stats,
277 struct GNUNET_FRAGMENT_Context *fc; 277 struct GNUNET_FRAGMENT_Context *fc;
278 size_t size; 278 size_t size;
279 uint64_t bits; 279 uint64_t bits;
280 280
281 GNUNET_STATISTICS_update (stats, _("# messages fragmented"), 1, GNUNET_NO); 281 GNUNET_STATISTICS_update (stats, _("# messages fragmented"), 1, GNUNET_NO);
282 GNUNET_assert (mtu >= 1024 + sizeof (struct FragmentHeader)); 282 GNUNET_assert (mtu >= 1024 + sizeof (struct FragmentHeader));
283 size = ntohs (msg->size); 283 size = ntohs (msg->size);
@@ -368,7 +368,7 @@ GNUNET_FRAGMENT_process_ack (struct GNUNET_FRAGMENT_Context *fc,
368 fc->wack = GNUNET_NO; 368 fc->wack = GNUNET_NO;
369 ndelay = GNUNET_TIME_absolute_get_duration (fc->last_round); 369 ndelay = GNUNET_TIME_absolute_get_duration (fc->last_round);
370 fc->ack_delay.rel_value_us = 370 fc->ack_delay.rel_value_us =
371 (ndelay.rel_value_us / fc->num_transmissions + 3 * fc->ack_delay.rel_value_us) / 4; 371 (ndelay.rel_value_us / fc->num_transmissions + 3 * fc->ack_delay.rel_value_us) / 4;
372 fc->num_transmissions = 0; 372 fc->num_transmissions = 0;
373 /* calculate ratio msg sent vs. msg acked */ 373 /* calculate ratio msg sent vs. msg acked */
374 ack_cnt = 0; 374 ack_cnt = 0;
@@ -385,8 +385,8 @@ GNUNET_FRAGMENT_process_ack (struct GNUNET_FRAGMENT_Context *fc,
385 if (0 == ack_cnt) 385 if (0 == ack_cnt)
386 { 386 {
387 /* complete loss */ 387 /* complete loss */
388 fc->msg_delay = GNUNET_TIME_relative_multiply (fc->msg_delay, 388 fc->msg_delay = GNUNET_TIME_relative_multiply (fc->msg_delay,
389 snd_cnt); 389 snd_cnt);
390 } 390 }
391 else if (snd_cnt > ack_cnt) 391 else if (snd_cnt > ack_cnt)
392 { 392 {