From 1240b4fd34967bf9b10d06d38247d7a7033e6b3e Mon Sep 17 00:00:00 2001 From: Bart Polot Date: Mon, 9 Dec 2013 14:50:26 +0000 Subject: - dont generate errors on async channel destruction, use stats instead --- src/mesh/gnunet-service-mesh_local.c | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/src/mesh/gnunet-service-mesh_local.c b/src/mesh/gnunet-service-mesh_local.c index 3e6285a20..5199476a0 100644 --- a/src/mesh/gnunet-service-mesh_local.c +++ b/src/mesh/gnunet-service-mesh_local.c @@ -433,6 +433,9 @@ handle_channel_destroy (void *cls, struct GNUNET_SERVER_Client *client, if (NULL == ch) { LOG (GNUNET_ERROR_TYPE_DEBUG, " channel %X not found\n", chid); + GNUNET_STATISTICS_update (stats, + "# client destroy messages on unknown channel", + 1, GNUNET_NO); GNUNET_SERVER_receive_done (client, GNUNET_OK); return; } @@ -491,8 +494,10 @@ handle_data (void *cls, struct GNUNET_SERVER_Client *client, ch = GML_channel_get (c, chid); if (NULL == ch) { - GNUNET_break (0); - GNUNET_SERVER_receive_done (client, GNUNET_SYSERR); + GNUNET_STATISTICS_update (stats, + "# client data messages on unknown channel", + 1, GNUNET_NO); + GNUNET_SERVER_receive_done (client, GNUNET_OK); return; } @@ -550,6 +555,9 @@ handle_ack (void *cls, struct GNUNET_SERVER_Client *client, { LOG (GNUNET_ERROR_TYPE_DEBUG, "Channel %X unknown.\n", chid); LOG (GNUNET_ERROR_TYPE_DEBUG, " for client %u.\n", c->id); + GNUNET_STATISTICS_update (stats, + "# client ack messages on unknown channel", + 1, GNUNET_NO); GNUNET_SERVER_receive_done (client, GNUNET_OK); return; } -- cgit v1.2.3