From 845c691c35ec1cb091deb361e4cc243b52bc287f Mon Sep 17 00:00:00 2001 From: Bart Polot Date: Thu, 18 Jul 2013 12:22:33 +0000 Subject: [PATCH] - debug --- src/mesh/mesh_api.c | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/src/mesh/mesh_api.c b/src/mesh/mesh_api.c index e7a3ae806..ec4396a70 100644 --- a/src/mesh/mesh_api.c +++ b/src/mesh/mesh_api.c @@ -1195,17 +1195,22 @@ send_callback (void *cls, size_t size, void *buf) GNUNET_assert (size >= psize); dmsg->header.size = htons (psize); dmsg->tid = htonl (t->tid); + dmsg->header.type = htons (GNUNET_MESSAGE_TYPE_MESH_LOCAL_DATA); + LOG (GNUNET_ERROR_TYPE_DEBUG, "# payload type %s\n", + GNUNET_MESH_DEBUG_M2S (ntohs (mh->type))); + } + else + { + LOG (GNUNET_ERROR_TYPE_DEBUG, + "# callback returned size 0, " + "application canceled transmission\n"); } - dmsg->header.type = htons (GNUNET_MESSAGE_TYPE_MESH_LOCAL_DATA); - LOG (GNUNET_ERROR_TYPE_DEBUG, "# payload type %s\n", - GNUNET_MESH_DEBUG_M2S (ntohs (mh->type))); - } else { struct GNUNET_MessageHeader *mh = (struct GNUNET_MessageHeader *) &th[1]; - LOG (GNUNET_ERROR_TYPE_DEBUG, "# mesh traffic, type %s\n", + LOG (GNUNET_ERROR_TYPE_DEBUG, "# mesh internal traffic, type %s\n", GNUNET_MESH_DEBUG_M2S (ntohs (mh->type))); memcpy (cbuf, &th[1], th->size); psize = th->size; -- 2.25.1