From 9e7b7ac944811f00132e7f54dc4a5f583a1326dd Mon Sep 17 00:00:00 2001 From: Christian Grothoff Date: Wed, 18 Dec 2013 10:31:31 +0000 Subject: -fix endianess before printing DEBUG message --- src/dv/dv_api.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'src/dv/dv_api.c') diff --git a/src/dv/dv_api.c b/src/dv/dv_api.c index e726d9d90..4cd072eb7 100644 --- a/src/dv/dv_api.c +++ b/src/dv/dv_api.c @@ -330,8 +330,9 @@ handle_message_receipt (void *cls, return; } LOG (GNUNET_ERROR_TYPE_DEBUG, - "Received message of type %u from DV service\n", - (unsigned int) msg->type); + "Received message of type %u with %u bytes from DV service\n", + (unsigned int) ntohs (msg->type), + (unsigned int) ntohs (msg->size)); switch (ntohs (msg->type)) { case GNUNET_MESSAGE_TYPE_DV_CONNECT: @@ -639,8 +640,8 @@ GNUNET_DV_send (struct GNUNET_DV_ServiceHandle *sh, } LOG (GNUNET_ERROR_TYPE_DEBUG, "Asked to send %u bytes of type %u to %s\n", - (unsigned int) msg->size, - (unsigned int) msg->type, + (unsigned int) ntohs (msg->size), + (unsigned int) ntohs (msg->type), GNUNET_i2s (target)); peer = GNUNET_CONTAINER_multipeermap_get (sh->peers, target); -- cgit v1.2.3