summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatthias Wachs <wachs@net.in.tum.de>2012-02-01 09:13:19 +0000
committerMatthias Wachs <wachs@net.in.tum.de>2012-02-01 09:13:19 +0000
commit1410eed84796598e79e5868f9754a02018099885 (patch)
tree2b3b4701f719d87a314b18821dcbf2c2fa5861de
parenta00e615c41331b3366781a62a1db864abb9c6105 (diff)
- fixed 2128: Blacklisting makes transport service crash
-rw-r--r--src/transport/gnunet-service-transport_blacklist.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/transport/gnunet-service-transport_blacklist.c b/src/transport/gnunet-service-transport_blacklist.c
index 6bd1caa50..fc7a5cec3 100644
--- a/src/transport/gnunet-service-transport_blacklist.c
+++ b/src/transport/gnunet-service-transport_blacklist.c
@@ -722,9 +722,11 @@ test_blacklisted (void *cls, const GNUNET_HashCode * key, void *value)
const char *transport_name = cls;
char *be = value;
- GNUNET_assert (transport_name != NULL);
- GNUNET_assert (be != NULL);
+ /* blacklist check for specific no specific transport*/
+ if (transport_name == NULL)
+ return GNUNET_NO;
+ /* blacklist check for specific transport */
if (0 == strcmp (transport_name, be))
return GNUNET_NO; /* abort iteration! */
return GNUNET_OK;
@@ -748,6 +750,8 @@ GST_blacklist_test_allowed (const struct GNUNET_PeerIdentity *peer,
{
struct GST_BlacklistCheck *bc;
+ GNUNET_assert (peer != NULL);
+
if ((blacklist != NULL) &&
(GNUNET_SYSERR ==
GNUNET_CONTAINER_multihashmap_get_multiple (blacklist, &peer->hashPubKey,