aboutsummaryrefslogtreecommitdiff
path: root/src/core
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2012-11-09 11:12:14 +0000
committerChristian Grothoff <christian@grothoff.org>2012-11-09 11:12:14 +0000
commitb9c41e6e8ca427d32d1f2a5b2e96a96386197315 (patch)
treeba26248497c77befa965cc98d2ce5e0a6bd25f5f /src/core
parent717f401456dafa195b7e2b09235c28132a9ea968 (diff)
downloadgnunet-b9c41e6e8ca427d32d1f2a5b2e96a96386197315.tar.gz
gnunet-b9c41e6e8ca427d32d1f2a5b2e96a96386197315.zip
-fix message recv accounting
Diffstat (limited to 'src/core')
-rw-r--r--src/core/gnunet-service-core_clients.c12
1 files changed, 5 insertions, 7 deletions
diff --git a/src/core/gnunet-service-core_clients.c b/src/core/gnunet-service-core_clients.c
index 56ebcc423..1d299dae8 100644
--- a/src/core/gnunet-service-core_clients.c
+++ b/src/core/gnunet-service-core_clients.c
@@ -512,7 +512,12 @@ client_tokenizer_callback (void *cls, void *client,
512{ 512{
513 struct TokenizerContext *tc = client; 513 struct TokenizerContext *tc = client;
514 struct GSC_ClientActiveRequest *car = tc->car; 514 struct GSC_ClientActiveRequest *car = tc->car;
515 char buf[92];
515 516
517 GNUNET_snprintf (buf, sizeof (buf),
518 gettext_noop ("# bytes of messages of type %u received"),
519 (unsigned int) ntohs (message->type));
520 GNUNET_STATISTICS_update (GSC_stats, buf, ntohs (message->size), GNUNET_NO);
516 if (0 == 521 if (0 ==
517 memcmp (&car->target, &GSC_my_identity, 522 memcmp (&car->target, &GSC_my_identity,
518 sizeof (struct GNUNET_PeerIdentity))) 523 sizeof (struct GNUNET_PeerIdentity)))
@@ -812,13 +817,6 @@ GSC_CLIENTS_deliver_message (const struct GNUNET_PeerIdentity *sender,
812 struct NotifyTrafficMessage *ntm; 817 struct NotifyTrafficMessage *ntm;
813 struct GNUNET_ATS_Information *a; 818 struct GNUNET_ATS_Information *a;
814 819
815 if (0 == options)
816 {
817 GNUNET_snprintf (buf, sizeof (buf),
818 gettext_noop ("# bytes of messages of type %u received"),
819 (unsigned int) ntohs (msg->type));
820 GNUNET_STATISTICS_update (GSC_stats, buf, msize, GNUNET_NO);
821 }
822 if (size >= GNUNET_SERVER_MAX_MESSAGE_SIZE) 820 if (size >= GNUNET_SERVER_MAX_MESSAGE_SIZE)
823 { 821 {
824 GNUNET_break (0); 822 GNUNET_break (0);