aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authornevans <nevans@140774ce-b5e7-0310-ab8b-a85725594a96>2011-01-12 14:02:55 +0000
committernevans <nevans@140774ce-b5e7-0310-ab8b-a85725594a96>2011-01-12 14:02:55 +0000
commita8bb5b1ad0796a91413a25832c19e64a7c6a851d (patch)
tree0fed200c69c671b04202925a93b7b7c76296fe4b /src
parent9f877e0bd5725c4aca3efeb8626031e919fb7540 (diff)
blacklist stats
git-svn-id: https://gnunet.org/svn/gnunet@14157 140774ce-b5e7-0310-ab8b-a85725594a96
Diffstat (limited to 'src')
-rw-r--r--src/transport/gnunet-service-transport.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/transport/gnunet-service-transport.c b/src/transport/gnunet-service-transport.c
index 43001dbc77..55aba048e4 100644
--- a/src/transport/gnunet-service-transport.c
+++ b/src/transport/gnunet-service-transport.c
@@ -972,13 +972,15 @@ is_blacklisted (const struct GNUNET_PeerIdentity *peer, struct TransportPlugin *
if (plugin->blacklist != NULL)
{
- if (GNUNET_CONTAINER_multihashmap_contains(plugin->blacklist, &peer->hashPubKey) == GNUNET_YES)
+ if (GNUNET_CONTAINER_multihashmap_contains (plugin->blacklist, &peer->hashPubKey) == GNUNET_YES)
{
#if DEBUG_BLACKLIST
GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
_("Peer `%s:%s' is blacklisted!\n"),
plugin->short_name, GNUNET_i2s (peer));
#endif
+ if (stats != NULL)
+ GNUNET_STATISTICS_update (stats, "# blacklisted peers refused", 1, GNUNET_NO);
return GNUNET_YES;
}
}
@@ -1165,6 +1167,7 @@ read_blacklist_file (const struct GNUNET_CONFIGURATION_Handle *cfg)
while ((pos < frstat.st_size) && isspace ( (unsigned char) data[pos]))
pos++;
}
+ GNUNET_STATISTICS_update (stats, "# Transport entries blacklisted", entries_found, GNUNET_NO);
GNUNET_free (data);
GNUNET_free (fn);
}