- don't call set on NULL hellos
authorBart Polot <bart@net.in.tum.de>
Tue, 4 Feb 2014 18:51:36 +0000 (18:51 +0000)
committerBart Polot <bart@net.in.tum.de>
Tue, 4 Feb 2014 18:51:36 +0000 (18:51 +0000)
src/mesh/gnunet-service-mesh_hello.c
src/mesh/gnunet-service-mesh_peer.c

index c380b0f314d5e0f7298674262a5db50505f22c62..bde6592d6526ea42702b4595db1f040b81e865c2 100644 (file)
@@ -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);
 
index ef5912ba632fb714435ba584d98dccc0fae580bb..3cf84ab754b805b5e030478cc4b61e2461cf60c7 100644 (file)
@@ -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)
   {