add statistics for packets dropped by cadet due to full buffer
[oweals/gnunet.git] / src / cadet / gnunet-service-cadet-new_core.c
index 086337c9ab25af579fa1d776744470e503fa459d..b5b3b65582a7263d6b494a836be1676015931f80 100644 (file)
@@ -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)