From 61c39c60565b386e0e12ea669556b030e8cd7180 Mon Sep 17 00:00:00 2001 From: Christian Grothoff Date: Sun, 6 Oct 2013 20:55:28 +0000 Subject: -remove trailing whitespace --- src/fragmentation/defragmentation.c | 8 ++++---- src/fragmentation/fragmentation.c | 10 +++++----- src/fragmentation/test_fragmentation.c | 4 ++-- 3 files changed, 11 insertions(+), 11 deletions(-) (limited to 'src/fragmentation') diff --git a/src/fragmentation/defragmentation.c b/src/fragmentation/defragmentation.c index f42207046..5f9eace13 100644 --- a/src/fragmentation/defragmentation.c +++ b/src/fragmentation/defragmentation.c @@ -459,7 +459,7 @@ GNUNET_DEFRAGMENT_process_fragment (struct GNUNET_DEFRAGMENT_Context *dc, for (mc = dc->head; NULL != mc; mc = mc->next) if (mc->fragment_id > fid) last++; - + mc = dc->head; while ((NULL != mc) && (fid != mc->fragment_id)) mc = mc->next; @@ -538,13 +538,13 @@ GNUNET_DEFRAGMENT_process_fragment (struct GNUNET_DEFRAGMENT_Context *dc, } /* send ACK */ if (mc->frag_times_write_offset - mc->frag_times_start_offset > 1) - { + { dc->latency = estimate_latency (mc); } delay = GNUNET_TIME_relative_multiply (dc->latency, bc + 1); if ( (last + fid == num_fragments) || - (0 == mc->bits) || - (GNUNET_YES == duplicate)) + (0 == mc->bits) || + (GNUNET_YES == duplicate)) { /* message complete or duplicate or last missing fragment in linear sequence; ACK now! */ 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) fc->num_rounds++; delay = GNUNET_TIME_relative_multiply (fc->ack_delay, 2); /* never use zero, need some time for ACK always */ - delay = GNUNET_TIME_relative_max (MIN_ACK_DELAY, delay); + delay = GNUNET_TIME_relative_max (MIN_ACK_DELAY, delay); fc->wack = GNUNET_YES; fc->last_round = GNUNET_TIME_absolute_get (); GNUNET_STATISTICS_update (fc->stats, _("# fragments wrap arounds"), 1, @@ -277,7 +277,7 @@ GNUNET_FRAGMENT_context_create (struct GNUNET_STATISTICS_Handle *stats, struct GNUNET_FRAGMENT_Context *fc; size_t size; uint64_t bits; - + GNUNET_STATISTICS_update (stats, _("# messages fragmented"), 1, GNUNET_NO); GNUNET_assert (mtu >= 1024 + sizeof (struct FragmentHeader)); size = ntohs (msg->size); @@ -368,7 +368,7 @@ GNUNET_FRAGMENT_process_ack (struct GNUNET_FRAGMENT_Context *fc, fc->wack = GNUNET_NO; ndelay = GNUNET_TIME_absolute_get_duration (fc->last_round); fc->ack_delay.rel_value_us = - (ndelay.rel_value_us / fc->num_transmissions + 3 * fc->ack_delay.rel_value_us) / 4; + (ndelay.rel_value_us / fc->num_transmissions + 3 * fc->ack_delay.rel_value_us) / 4; fc->num_transmissions = 0; /* calculate ratio msg sent vs. msg acked */ ack_cnt = 0; @@ -385,8 +385,8 @@ GNUNET_FRAGMENT_process_ack (struct GNUNET_FRAGMENT_Context *fc, if (0 == ack_cnt) { /* complete loss */ - fc->msg_delay = GNUNET_TIME_relative_multiply (fc->msg_delay, - snd_cnt); + fc->msg_delay = GNUNET_TIME_relative_multiply (fc->msg_delay, + snd_cnt); } else if (snd_cnt > ack_cnt) { diff --git a/src/fragmentation/test_fragmentation.c b/src/fragmentation/test_fragmentation.c index 2a30d7d93..c41272d42 100644 --- a/src/fragmentation/test_fragmentation.c +++ b/src/fragmentation/test_fragmentation.c @@ -213,8 +213,8 @@ run (void *cls, char *const *args, const char *cfgfile, htons (sizeof (struct GNUNET_MessageHeader) + (17 * i) % (32 * 1024)); frags[i] = GNUNET_FRAGMENT_context_create (NULL /* no stats */ , MTU, &trackers[i], - GNUNET_TIME_UNIT_MILLISECONDS, - GNUNET_TIME_UNIT_SECONDS, + GNUNET_TIME_UNIT_MILLISECONDS, + GNUNET_TIME_UNIT_SECONDS, msg, &proc_frac, &frags[i]); } -- cgit v1.2.3