From: Bart Polot Date: Thu, 18 Jul 2013 12:22:33 +0000 (+0000) Subject: - debug X-Git-Tag: initial-import-from-subversion-38251~8178 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=845c691c35ec1cb091deb361e4cc243b52bc287f;p=oweals%2Fgnunet.git - debug --- 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;