diff options
author | Christian Grothoff <christian@grothoff.org> | 2013-10-06 20:55:28 +0000 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2013-10-06 20:55:28 +0000 |
commit | 61c39c60565b386e0e12ea669556b030e8cd7180 (patch) | |
tree | 59109aeab8297bdc996faca8c4e38ec7426c36cf /src/fragmentation | |
parent | 780eb09dd8040ecf8649d40ddf8314464e0fc48e (diff) | |
download | gnunet-61c39c60565b386e0e12ea669556b030e8cd7180.tar.gz gnunet-61c39c60565b386e0e12ea669556b030e8cd7180.zip |
-remove trailing whitespace
Diffstat (limited to 'src/fragmentation')
-rw-r--r-- | src/fragmentation/defragmentation.c | 8 | ||||
-rw-r--r-- | src/fragmentation/fragmentation.c | 10 | ||||
-rw-r--r-- | src/fragmentation/test_fragmentation.c | 4 |
3 files changed, 11 insertions, 11 deletions
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, | |||
459 | for (mc = dc->head; NULL != mc; mc = mc->next) | 459 | for (mc = dc->head; NULL != mc; mc = mc->next) |
460 | if (mc->fragment_id > fid) | 460 | if (mc->fragment_id > fid) |
461 | last++; | 461 | last++; |
462 | 462 | ||
463 | mc = dc->head; | 463 | mc = dc->head; |
464 | while ((NULL != mc) && (fid != mc->fragment_id)) | 464 | while ((NULL != mc) && (fid != mc->fragment_id)) |
465 | mc = mc->next; | 465 | mc = mc->next; |
@@ -538,13 +538,13 @@ GNUNET_DEFRAGMENT_process_fragment (struct GNUNET_DEFRAGMENT_Context *dc, | |||
538 | } | 538 | } |
539 | /* send ACK */ | 539 | /* send ACK */ |
540 | if (mc->frag_times_write_offset - mc->frag_times_start_offset > 1) | 540 | if (mc->frag_times_write_offset - mc->frag_times_start_offset > 1) |
541 | { | 541 | { |
542 | dc->latency = estimate_latency (mc); | 542 | dc->latency = estimate_latency (mc); |
543 | } | 543 | } |
544 | delay = GNUNET_TIME_relative_multiply (dc->latency, bc + 1); | 544 | delay = GNUNET_TIME_relative_multiply (dc->latency, bc + 1); |
545 | if ( (last + fid == num_fragments) || | 545 | if ( (last + fid == num_fragments) || |
546 | (0 == mc->bits) || | 546 | (0 == mc->bits) || |
547 | (GNUNET_YES == duplicate)) | 547 | (GNUNET_YES == duplicate)) |
548 | { | 548 | { |
549 | /* message complete or duplicate or last missing fragment in | 549 | /* message complete or duplicate or last missing fragment in |
550 | linear sequence; ACK now! */ | 550 | 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) | |||
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 | { |
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, | |||
213 | htons (sizeof (struct GNUNET_MessageHeader) + (17 * i) % (32 * 1024)); | 213 | htons (sizeof (struct GNUNET_MessageHeader) + (17 * i) % (32 * 1024)); |
214 | frags[i] = GNUNET_FRAGMENT_context_create (NULL /* no stats */ , | 214 | frags[i] = GNUNET_FRAGMENT_context_create (NULL /* no stats */ , |
215 | MTU, &trackers[i], | 215 | MTU, &trackers[i], |
216 | GNUNET_TIME_UNIT_MILLISECONDS, | 216 | GNUNET_TIME_UNIT_MILLISECONDS, |
217 | GNUNET_TIME_UNIT_SECONDS, | 217 | GNUNET_TIME_UNIT_SECONDS, |
218 | msg, | 218 | msg, |
219 | &proc_frac, &frags[i]); | 219 | &proc_frac, &frags[i]); |
220 | } | 220 | } |