From: Bart Polot Date: Mon, 23 Jan 2012 17:36:49 +0000 (+0000) Subject: - Added debug info X-Git-Tag: initial-import-from-subversion-38251~15165 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=5637b075a3a5681ee73d034e233ba53347f84c1f;p=oweals%2Fgnunet.git - Added debug info --- 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); }