From: Bart Polot Date: Fri, 27 Jul 2012 14:56:08 +0000 (+0000) Subject: - fix crash on typeless clients X-Git-Tag: initial-import-from-subversion-38251~12300 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=64967935cfb4a8be658ef1332e06cf16435d415f;p=oweals%2Fgnunet.git - fix crash on typeless clients --- 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; }