From ebfc819af3fe71c4f567afedc38baa803a00118e Mon Sep 17 00:00:00 2001 From: Bart Polot Date: Fri, 15 Nov 2013 14:15:18 +0000 Subject: [PATCH] - show WARNING if elements were not in the hashmaps --- src/mesh/gnunet-service-mesh_connection.c | 3 ++- src/mesh/gnunet-service-mesh_dht.c | 4 +++- src/mesh/gnunet-service-mesh_local.c | 12 +++++++----- 3 files changed, 12 insertions(+), 7 deletions(-) diff --git a/src/mesh/gnunet-service-mesh_connection.c b/src/mesh/gnunet-service-mesh_connection.c index 27e53a7e2..e76839596 100644 --- a/src/mesh/gnunet-service-mesh_connection.c +++ b/src/mesh/gnunet-service-mesh_connection.c @@ -2146,7 +2146,8 @@ GMC_destroy (struct MeshConnection *c) if (GNUNET_NO == GMC_is_origin (c, GNUNET_YES)) path_destroy (c->path); - (void) GNUNET_CONTAINER_multihashmap_remove (connections, &c->id, c); + GNUNET_break (GNUNET_YES == + GNUNET_CONTAINER_multihashmap_remove (connections, &c->id, c)); GNUNET_free (c); } diff --git a/src/mesh/gnunet-service-mesh_dht.c b/src/mesh/gnunet-service-mesh_dht.c index 13b95f31c..168706dcd 100644 --- a/src/mesh/gnunet-service-mesh_dht.c +++ b/src/mesh/gnunet-service-mesh_dht.c @@ -384,7 +384,9 @@ GMD_search (const struct GNUNET_PeerIdentity *peer_id, void GMD_search_stop (struct GMD_search_handle *h) { - (void) GNUNET_CONTAINER_multihashmap32_remove (get_requests, h->peer_id, h); + GNUNET_break (GNUNET_OK == + GNUNET_CONTAINER_multihashmap32_remove (get_requests, + h->peer_id, h)); GNUNET_DHT_get_stop (h->dhtget); GNUNET_free (h); } \ No newline at end of file diff --git a/src/mesh/gnunet-service-mesh_local.c b/src/mesh/gnunet-service-mesh_local.c index c85d39c87..eab222481 100644 --- a/src/mesh/gnunet-service-mesh_local.c +++ b/src/mesh/gnunet-service-mesh_local.c @@ -813,7 +813,7 @@ GML_channel_add (struct MeshClient *client, /** - * Remove a channel from a client + * Remove a channel from a client. * * @param client Client. * @param chid Channel ID. @@ -825,11 +825,13 @@ GML_channel_remove (struct MeshClient *client, struct MeshChannel *ch) { if (GNUNET_MESH_LOCAL_CHANNEL_ID_SERV <= chid) - (void) GNUNET_CONTAINER_multihashmap32_remove (client->incoming_channels, - chid, ch); + GNUNET_break (GNUNET_YES == + GNUNET_CONTAINER_multihashmap32_remove (client->incoming_channels, + chid, ch)); else if (GNUNET_MESH_LOCAL_CHANNEL_ID_CLI <= chid) - (void) GNUNET_CONTAINER_multihashmap32_remove (client->own_channels, - chid, ch); + GNUNET_break (GNUNET_YES == + GNUNET_CONTAINER_multihashmap32_remove (client->own_channels, + chid, ch)); else GNUNET_break (0); } -- 2.25.1