From 5637b075a3a5681ee73d034e233ba53347f84c1f Mon Sep 17 00:00:00 2001 From: Bart Polot Date: Mon, 23 Jan 2012 17:36:49 +0000 Subject: - Added debug info --- src/mesh/mesh_api.c | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/src/mesh/mesh_api.c b/src/mesh/mesh_api.c index 279fb1fe7..2c6d90675 100644 --- a/src/mesh/mesh_api.c +++ b/src/mesh/mesh_api.c @@ -1293,7 +1293,15 @@ GNUNET_MESH_disconnect (struct GNUNET_MESH_Handle *handle) GNUNET_break (UINT32_MAX == th->priority); GNUNET_break (NULL == th->notify); msg = (struct GNUNET_MessageHeader *) &th[1]; - GNUNET_break (GNUNET_MESSAGE_TYPE_MESH_LOCAL_CONNECT == ntohs(msg->type)); + if (GNUNET_MESSAGE_TYPE_MESH_LOCAL_CONNECT != ntohs(msg->type)) + { + GNUNET_break (0); +#if MESH_API_DEBUG + GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "mesh: expected %u, got %u\n", + GNUNET_MESSAGE_TYPE_MESH_LOCAL_CONNECT, ntohs(msg->type)); +#endif + } + GNUNET_CONTAINER_DLL_remove (handle->th_head, handle->th_tail, th); GNUNET_free (th); } -- cgit v1.2.3