aboutsummaryrefslogtreecommitdiff
path: root/src/cadet
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2017-01-27 17:29:15 +0100
committerChristian Grothoff <christian@grothoff.org>2017-01-27 17:29:15 +0100
commit80f33364925f6718673dafaf7f06940c2b06af06 (patch)
tree948cfa7f6b5f22a88a90c2e482b7ac484195b963 /src/cadet
parent1310298005df1c914d6c5d36c5f66a78fc8ebee9 (diff)
downloadgnunet-80f33364925f6718673dafaf7f06940c2b06af06.tar.gz
gnunet-80f33364925f6718673dafaf7f06940c2b06af06.zip
add statistics for packets dropped by cadet due to full buffer
Diffstat (limited to 'src/cadet')
-rw-r--r--src/cadet/gnunet-service-cadet-new_core.c6
1 files changed, 5 insertions, 1 deletions
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,
210 GCP_2s (prev), 210 GCP_2s (prev),
211 GNUNET_i2s (GCP_get_id (dir->hop)), 211 GNUNET_i2s (GCP_get_id (dir->hop)),
212 GNUNET_sh2s (&cid->connection_of_tunnel)); 212 GNUNET_sh2s (&cid->connection_of_tunnel));
213 GNUNET_assert (dir->out_rpos == dir->out_wpos); 213 GNUNET_STATISTICS_update (stats,
214 "# messages dropped due to full buffer",
215 1,
216 GNUNET_NO);
217 GNUNET_assert (dir->out_rpos == dir->out_wpos);
214 GNUNET_MQ_discard (env); 218 GNUNET_MQ_discard (env);
215 dir->out_rpos++; 219 dir->out_rpos++;
216 if (ROUTE_BUFFER_SIZE == dir->out_rpos) 220 if (ROUTE_BUFFER_SIZE == dir->out_rpos)