From 80f33364925f6718673dafaf7f06940c2b06af06 Mon Sep 17 00:00:00 2001 From: Christian Grothoff Date: Fri, 27 Jan 2017 17:29:15 +0100 Subject: [PATCH] add statistics for packets dropped by cadet due to full buffer --- src/cadet/gnunet-service-cadet-new_core.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/cadet/gnunet-service-cadet-new_core.c b/src/cadet/gnunet-service-cadet-new_core.c index 086337c9a..b5b3b6558 100644 --- a/src/cadet/gnunet-service-cadet-new_core.c +++ b/src/cadet/gnunet-service-cadet-new_core.c @@ -210,7 +210,11 @@ route_message (struct CadetPeer *prev, GCP_2s (prev), GNUNET_i2s (GCP_get_id (dir->hop)), GNUNET_sh2s (&cid->connection_of_tunnel)); - GNUNET_assert (dir->out_rpos == dir->out_wpos); + GNUNET_STATISTICS_update (stats, + "# messages dropped due to full buffer", + 1, + GNUNET_NO); + GNUNET_assert (dir->out_rpos == dir->out_wpos); GNUNET_MQ_discard (env); dir->out_rpos++; if (ROUTE_BUFFER_SIZE == dir->out_rpos) -- 2.25.1