From 19762ee38c596516abb811c727d80196679b79e0 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Julius=20B=C3=BCnger?= Date: Fri, 24 Aug 2018 07:58:47 +0200 Subject: [PATCH] Count number of unrequested pull replies with statistics --- src/rps/gnunet-service-rps.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/rps/gnunet-service-rps.c b/src/rps/gnunet-service-rps.c index 7802b183b..5d0e60508 100644 --- a/src/rps/gnunet-service-rps.c +++ b/src/rps/gnunet-service-rps.c @@ -2361,6 +2361,7 @@ send_pull_reply (const struct GNUNET_PeerIdentity *peer_id, // TODO check with send intention: as send_channel is used/opened we indicate // a sending intention without intending it. // -> clean peer afterwards? + // -> use recv_channel? } @@ -3118,6 +3119,10 @@ check_peer_pull_reply (void *cls, LOG (GNUNET_ERROR_TYPE_WARNING, "Received a pull reply from a peer (%s) we didn't request one from!\n", GNUNET_i2s (sender)); + GNUNET_STATISTICS_update (stats, + "# unrequested pull replies", + 1, + GNUNET_NO); GNUNET_break_op (0); return GNUNET_SYSERR; } -- 2.25.1