From 1410eed84796598e79e5868f9754a02018099885 Mon Sep 17 00:00:00 2001 From: Matthias Wachs Date: Wed, 1 Feb 2012 09:13:19 +0000 Subject: [PATCH] - fixed 2128: Blacklisting makes transport service crash --- src/transport/gnunet-service-transport_blacklist.c | 8 ++++++-- 1 file 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, -- 2.25.1