From e5c0f2652d84367e36662783f05c94efca16d1c2 Mon Sep 17 00:00:00 2001 From: "tg(x)" <*@tg-x.net> Date: Fri, 24 Feb 2017 22:19:16 +0100 Subject: [PATCH] util: logging --- src/util/mq.c | 2 +- src/util/server.c | 10 +++++----- src/util/service_new.c | 9 +++++++++ 3 files changed, 15 insertions(+), 6 deletions(-) diff --git a/src/util/mq.c b/src/util/mq.c index 71619bda4..79e2d0455 100644 --- a/src/util/mq.c +++ b/src/util/mq.c @@ -764,7 +764,7 @@ server_client_send_impl (struct GNUNET_MQ_Handle *mq, GNUNET_assert (NULL != mq); LOG (GNUNET_ERROR_TYPE_DEBUG, - "Transmitting message of type %u and size %u\n", + "Sending message of type %u and size %u\n", ntohs (msg->type), ntohs (msg->size)); struct ServerClientSocketState *state = impl_state; diff --git a/src/util/server.c b/src/util/server.c index d7da5c6c0..83c30e328 100644 --- a/src/util/server.c +++ b/src/util/server.c @@ -945,9 +945,9 @@ GNUNET_SERVER_inject (struct GNUNET_SERVER_Handle *server, type = ntohs (message->type); size = ntohs (message->size); - LOG (GNUNET_ERROR_TYPE_DEBUG, - "Server schedules transmission of %u-byte message of type %u to client.\n", - size, type); + LOG (GNUNET_ERROR_TYPE_INFO, + "Received message of type %u and size %u from client\n", + type, size); found = GNUNET_NO; for (pos = server->handlers; NULL != pos; pos = pos->next) { @@ -1240,8 +1240,8 @@ client_message_tokenizer_callback (void *cls, int ret; LOG (GNUNET_ERROR_TYPE_DEBUG, - "Tokenizer gives server message of type %u from client\n", - ntohs (message->type)); + "Tokenizer gives server message of type %u and size %u from client\n", + ntohs (message->type), ntohs (message->size)); sender->in_process_client_buffer = GNUNET_YES; ret = GNUNET_SERVER_inject (server, sender, message); sender->in_process_client_buffer = GNUNET_NO; diff --git a/src/util/service_new.c b/src/util/service_new.c index 987fb1c3b..8371f7703 100644 --- a/src/util/service_new.c +++ b/src/util/service_new.c @@ -1999,6 +1999,11 @@ service_mq_send (struct GNUNET_MQ_Handle *mq, if (NULL != client->drop_task) return; /* we're going down right now, do not try to send */ GNUNET_assert (NULL == client->send_task); + + LOG (GNUNET_ERROR_TYPE_INFO, + "Sending message of type %u and size %u to client\n", + ntohs (msg->type), ntohs (msg->size)); + client->msg = msg; client->msg_pos = 0; client->send_task @@ -2097,6 +2102,10 @@ service_client_mst_cb (void *cls, { struct GNUNET_SERVICE_Client *client = cls; + LOG (GNUNET_ERROR_TYPE_INFO, + "Received message of type %u and size %u from client\n", + ntohs (message->type), ntohs (message->size)); + GNUNET_assert (GNUNET_NO == client->needs_continue); client->needs_continue = GNUNET_YES; client->warn_type = ntohs (message->type); -- 2.25.1