diff options
author | Christian Grothoff <christian@grothoff.org> | 2011-07-14 12:04:07 +0000 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2011-07-14 12:04:07 +0000 |
commit | d3c70c3bfde07f93c72effebbfd11436a5a9590c (patch) | |
tree | 41d614addc19e63fe0becba5c6d42c521ec917d6 /src/fragmentation/defragmentation.c | |
parent | 8af646076372f322fd772736523e890cef2d69f0 (diff) | |
download | gnunet-d3c70c3bfde07f93c72effebbfd11436a5a9590c.tar.gz gnunet-d3c70c3bfde07f93c72effebbfd11436a5a9590c.zip |
nicer stats, bugfix
Diffstat (limited to 'src/fragmentation/defragmentation.c')
-rw-r--r-- | src/fragmentation/defragmentation.c | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/src/fragmentation/defragmentation.c b/src/fragmentation/defragmentation.c index cc42d3e75..6ad8d0faf 100644 --- a/src/fragmentation/defragmentation.c +++ b/src/fragmentation/defragmentation.c | |||
@@ -270,6 +270,10 @@ send_ack (void *cls, | |||
270 | fa.header.type = htons (GNUNET_MESSAGE_TYPE_FRAGMENT_ACK); | 270 | fa.header.type = htons (GNUNET_MESSAGE_TYPE_FRAGMENT_ACK); |
271 | fa.fragment_id = htonl (mc->fragment_id); | 271 | fa.fragment_id = htonl (mc->fragment_id); |
272 | fa.bits = GNUNET_htonll (mc->bits); | 272 | fa.bits = GNUNET_htonll (mc->bits); |
273 | GNUNET_STATISTICS_update (mc->dc->stats, | ||
274 | _("# acknowledgements sent for fragment"), | ||
275 | 1, | ||
276 | GNUNET_NO); | ||
273 | dc->ackp (dc->cls, mc->fragment_id, &fa.header); | 277 | dc->ackp (dc->cls, mc->fragment_id, &fa.header); |
274 | } | 278 | } |
275 | 279 | ||
@@ -445,7 +449,7 @@ GNUNET_DEFRAGMENT_process_fragment (struct GNUNET_DEFRAGMENT_Context *dc, | |||
445 | return GNUNET_SYSERR; | 449 | return GNUNET_SYSERR; |
446 | } | 450 | } |
447 | GNUNET_STATISTICS_update (dc->stats, | 451 | GNUNET_STATISTICS_update (dc->stats, |
448 | _("Fragments received"), | 452 | _("# fragments received"), |
449 | 1, | 453 | 1, |
450 | GNUNET_NO); | 454 | GNUNET_NO); |
451 | mc = dc->head; | 455 | mc = dc->head; |
@@ -509,7 +513,7 @@ GNUNET_DEFRAGMENT_process_fragment (struct GNUNET_DEFRAGMENT_Context *dc, | |||
509 | { | 513 | { |
510 | duplicate = GNUNET_YES; | 514 | duplicate = GNUNET_YES; |
511 | GNUNET_STATISTICS_update (dc->stats, | 515 | GNUNET_STATISTICS_update (dc->stats, |
512 | _("Duplicate fragments received"), | 516 | _("# duplicate fragments received"), |
513 | 1, | 517 | 1, |
514 | GNUNET_NO); | 518 | GNUNET_NO); |
515 | } | 519 | } |
@@ -533,7 +537,7 @@ GNUNET_DEFRAGMENT_process_fragment (struct GNUNET_DEFRAGMENT_Context *dc, | |||
533 | (0 == mc->bits) ) | 537 | (0 == mc->bits) ) |
534 | { | 538 | { |
535 | GNUNET_STATISTICS_update (dc->stats, | 539 | GNUNET_STATISTICS_update (dc->stats, |
536 | _("Messages defragmented"), | 540 | _("# messages defragmented"), |
537 | 1, | 541 | 1, |
538 | GNUNET_NO); | 542 | GNUNET_NO); |
539 | /* message complete, notify! */ | 543 | /* message complete, notify! */ |