From df9733ded851cfa9ed0c81ce4c99dc6911da492e Mon Sep 17 00:00:00 2001 From: Bart Polot Date: Tue, 4 Feb 2014 18:51:36 +0000 Subject: - don't call set on NULL hellos --- src/mesh/gnunet-service-mesh_hello.c | 5 +++++ src/mesh/gnunet-service-mesh_peer.c | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) (limited to 'src/mesh') diff --git a/src/mesh/gnunet-service-mesh_hello.c b/src/mesh/gnunet-service-mesh_hello.c index c380b0f31..bde6592d6 100644 --- a/src/mesh/gnunet-service-mesh_hello.c +++ b/src/mesh/gnunet-service-mesh_hello.c @@ -106,6 +106,11 @@ got_hello (void *cls, const struct GNUNET_PeerIdentity *id, return; } LOG (GNUNET_ERROR_TYPE_DEBUG, " hello for %s\n", GNUNET_i2s (id)); + if (NULL == hello) + { + LOG (GNUNET_ERROR_TYPE_DEBUG, " hello is NULL\n"); + return; + } peer = GMP_get (id); GMP_set_hello (peer, hello); diff --git a/src/mesh/gnunet-service-mesh_peer.c b/src/mesh/gnunet-service-mesh_peer.c index ef5912ba6..3cf84ab75 100644 --- a/src/mesh/gnunet-service-mesh_peer.c +++ b/src/mesh/gnunet-service-mesh_peer.c @@ -1890,7 +1890,7 @@ GMP_set_hello (struct MeshPeer *peer, const struct GNUNET_HELLO_Message *hello) if (NULL == hello) return; - + old = GMP_get_hello (peer); if (NULL == old) { -- cgit v1.2.3