From d7536853946ac46b4f882ed50d41c0b3ef9f17ba Mon Sep 17 00:00:00 2001 From: Bart Polot Date: Fri, 20 Dec 2013 04:24:26 +0000 Subject: [PATCH] - fix compilation issue --- src/mesh/gnunet-mesh.c | 14 +++++++------- src/mesh/mesh_api.c | 9 ++++----- 2 files changed, 11 insertions(+), 12 deletions(-) diff --git a/src/mesh/gnunet-mesh.c b/src/mesh/gnunet-mesh.c index 314039bfd..669ab9a01 100644 --- a/src/mesh/gnunet-mesh.c +++ b/src/mesh/gnunet-mesh.c @@ -182,8 +182,8 @@ read_stdio (void *cls, { struct GNUNET_HashCode hash; GNUNET_CRYPTO_hash (buf, data_size, &hash); - GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, " hash SEND %s (%u)\n", - GNUNET_h2s_full (&hash), data_size); + GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, " cli SEND %p hash %s (%u)\n", + buf, GNUNET_h2s_full (&hash), data_size); } if (data_size < 1) { @@ -340,16 +340,16 @@ data_callback (void *cls, len = ntohs (message->size) - sizeof (*message); GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Got %u bytes\n", len); - GNUNET_BIO_write (1, (char *) &message[1], len); + write (1, (char *) &message[1], len); { struct GNUNET_HashCode hash; GNUNET_CRYPTO_hash (message, ntohs (message->size), &hash); - GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, " api hash RECV %s (%u)\n", - GNUNET_h2s_full (&hash), ntohs (message->size)); + GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, " api RECV %p hash %s (%u)\n", + message, GNUNET_h2s_full (&hash), ntohs (message->size)); GNUNET_CRYPTO_hash (&message[1], len, &hash); - GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, " hash RECV %s (%u)\n", - GNUNET_h2s_full (&hash), len); + GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, " cli RECV %p hash %s (%u)\n", + &message[1], GNUNET_h2s_full (&hash), len); } return GNUNET_OK; } diff --git a/src/mesh/mesh_api.c b/src/mesh/mesh_api.c index 7890c7d7f..c3274f1c5 100644 --- a/src/mesh/mesh_api.c +++ b/src/mesh/mesh_api.c @@ -856,18 +856,17 @@ process_incoming_data (struct GNUNET_MESH_Handle *h, } type = ntohs (payload->type); size = ntohs (payload->size); - LOG (GNUNET_ERROR_TYPE_DEBUG, " payload type %u\n", type); + LOG (GNUNET_ERROR_TYPE_DEBUG, " payload type %s\n", GM_m2s (type)); for (i = 0; i < h->n_handlers; i++) { handler = &h->message_handlers[i]; - LOG (GNUNET_ERROR_TYPE_DEBUG, - " checking handler for type %u\n", + LOG (GNUNET_ERROR_TYPE_DEBUG, " checking handler for type %u\n", handler->type); if (handler->type == type) { GNUNET_CRYPTO_hash (payload, size, &hash); - LOG (GNUNET_ERROR_TYPE_DEBUG, " hash recv %s (%u)\n", - GNUNET_h2s_full (&hash), size); + LOG (GNUNET_ERROR_TYPE_DEBUG, " recv %p hash %s (%u)\n", + payload, GNUNET_h2s_full (&hash), size); if (GNUNET_OK != handler->callback (h->cls, ch, &ch->ctx, payload)) { -- 2.25.1