From 64967935cfb4a8be658ef1332e06cf16435d415f Mon Sep 17 00:00:00 2001 From: Bart Polot Date: Fri, 27 Jul 2012 14:56:08 +0000 Subject: [PATCH] - fix crash on typeless clients --- src/mesh/gnunet-service-mesh.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/mesh/gnunet-service-mesh.c b/src/mesh/gnunet-service-mesh.c index efa2ad945..b3f739c00 100644 --- a/src/mesh/gnunet-service-mesh.c +++ b/src/mesh/gnunet-service-mesh.c @@ -1666,6 +1666,8 @@ client_is_subscribed (uint16_t message_type, struct MeshClient *c) { struct GNUNET_HashCode hc; + if (NULL == c->types) + return GNUNET_NO; GNUNET_CRYPTO_hash (&message_type, sizeof (uint16_t), &hc); return GNUNET_CONTAINER_multihashmap_contains (c->types, &hc); } @@ -6259,6 +6261,7 @@ handle_local_unicast (void *cls, struct GNUNET_SERVER_Client *client, handle_mesh_data_unicast (NULL, &my_full_id, ©->header, NULL, 0); send_client_tunnel_ack (t->owner, t); } + GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "receive done OK\n"); GNUNET_SERVER_receive_done (client, GNUNET_OK); return; } -- 2.25.1