[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[GNUnet-SVN] [gnunet] 03/08: fix logging
From: |
gnunet |
Subject: |
[GNUnet-SVN] [gnunet] 03/08: fix logging |
Date: |
Sat, 03 Mar 2018 22:42:48 +0100 |
This is an automated email from the git hooks/post-receive script.
grothoff pushed a commit to branch master
in repository gnunet.
commit 908626e8e19695aa5cd291e5033761ed744d5332
Author: Christian Grothoff <address@hidden>
AuthorDate: Sat Mar 3 21:23:50 2018 +0100
fix logging
---
src/util/client.c | 46 +++++++++++++++++++++++-----------------------
src/util/mq.c | 32 ++++++++++++++++----------------
src/util/scheduler.c | 14 +++++++-------
3 files changed, 46 insertions(+), 46 deletions(-)
diff --git a/src/util/client.c b/src/util/client.c
index 7a718fc8d..3479fa971 100644
--- a/src/util/client.c
+++ b/src/util/client.c
@@ -261,11 +261,11 @@ transmit_ready (void *cls)
pos = (const char *) cstate->msg;
len = ntohs (cstate->msg->size);
GNUNET_assert (cstate->msg_off < len);
- GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
- "client: message of type %u trying to send with socket %p (MQ:
%p\n",
- ntohs(cstate->msg->type),
- cstate->sock,
- cstate->mq);
+ LOG (GNUNET_ERROR_TYPE_DEBUG,
+ "message of type %u trying to send with socket %p (MQ: %p\n",
+ ntohs(cstate->msg->type),
+ cstate->sock,
+ cstate->mq);
RETRY:
ret = GNUNET_NETWORK_socket_send (cstate->sock,
@@ -273,13 +273,13 @@ transmit_ready (void *cls)
len - cstate->msg_off);
if (-1 == ret)
{
- GNUNET_log (GNUNET_ERROR_TYPE_WARNING,
- "client: error during sending message of type %u\n",
- ntohs(cstate->msg->type));
+ LOG (GNUNET_ERROR_TYPE_WARNING,
+ "Error during sending message of type %u\n",
+ ntohs(cstate->msg->type));
if (EINTR == errno){
- GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
- "client: retrying message of type %u\n",
- ntohs(cstate->msg->type));
+ LOG (GNUNET_ERROR_TYPE_DEBUG,
+ "Retrying message of type %u\n",
+ ntohs(cstate->msg->type));
goto RETRY;
}
GNUNET_MQ_inject_error (cstate->mq,
@@ -290,9 +290,9 @@ transmit_ready (void *cls)
cstate->msg_off += ret;
if (cstate->msg_off < len)
{
- GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
- "client: rescheduling message of type %u\n",
- ntohs(cstate->msg->type));
+ LOG (GNUNET_ERROR_TYPE_DEBUG,
+ "rescheduling message of type %u\n",
+ ntohs(cstate->msg->type));
cstate->send_task
= GNUNET_SCHEDULER_add_write_net (GNUNET_TIME_UNIT_FOREVER_REL,
cstate->sock,
@@ -302,9 +302,9 @@ transmit_ready (void *cls)
GNUNET_MQ_impl_send_in_flight (cstate->mq);
return;
}
- GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
- "client: sending message of type %u successful\n",
- ntohs(cstate->msg->type));
+ LOG (GNUNET_ERROR_TYPE_DEBUG,
+ "sending message of type %u successful\n",
+ ntohs(cstate->msg->type));
cstate->msg = NULL;
GNUNET_MQ_impl_send_continue (cstate->mq);
}
@@ -394,9 +394,9 @@ connection_client_destroy_impl (struct GNUNET_MQ_Handle *mq,
if (NULL != cstate->retry_task)
GNUNET_SCHEDULER_cancel (cstate->retry_task);
if (NULL != cstate->sock){
- GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
- "client: destroying socket: %p\n",
- cstate->sock);
+ LOG (GNUNET_ERROR_TYPE_DEBUG,
+ "destroying socket: %p\n",
+ cstate->sock);
GNUNET_NETWORK_socket_close (cstate->sock);
}
cancel_aps (cstate);
@@ -822,9 +822,9 @@ connection_client_send_impl (struct GNUNET_MQ_Handle *mq,
cstate->msg = msg;
cstate->msg_off = 0;
if (NULL == cstate->sock){
- GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
- "client: message of type %u waiting for socket\n",
- ntohs(msg->type));
+ LOG (GNUNET_ERROR_TYPE_DEBUG,
+ "message of type %u waiting for socket\n",
+ ntohs(msg->type));
return; /* still waiting for connection */
}
cstate->send_task
diff --git a/src/util/mq.c b/src/util/mq.c
index 33bbaa6ad..af700836c 100644
--- a/src/util/mq.c
+++ b/src/util/mq.c
@@ -358,10 +358,10 @@ GNUNET_MQ_send (struct GNUNET_MQ_Handle *mq,
GNUNET_assert (NULL == mq->envelope_head);
mq->current_envelope = ev;
- GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
- "mq: sending message of type %u, queue empty (MQ: %p)\n",
- ntohs(ev->mh->type),
- mq);
+ LOG (GNUNET_ERROR_TYPE_DEBUG,
+ "sending message of type %u, queue empty (MQ: %p)\n",
+ ntohs(ev->mh->type),
+ mq);
mq->send_impl (mq,
ev->mh,
@@ -459,9 +459,9 @@ impl_send_continue (void *cls)
mq->envelope_tail,
mq->current_envelope);
- GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
- "mq: sending message of type %u from queue\n",
- ntohs(mq->current_envelope->mh->type));
+ LOG (GNUNET_ERROR_TYPE_DEBUG,
+ "sending message of type %u from queue\n",
+ ntohs(mq->current_envelope->mh->type));
mq->send_impl (mq,
mq->current_envelope->mh,
@@ -851,9 +851,9 @@ GNUNET_MQ_destroy (struct GNUNET_MQ_Handle *mq)
ev);
GNUNET_assert (0 < mq->queue_length);
mq->queue_length--;
- GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
- "MQ destroy drops message of type %u\n",
- ntohs (ev->mh->type));
+ LOG (GNUNET_ERROR_TYPE_DEBUG,
+ "MQ destroy drops message of type %u\n",
+ ntohs (ev->mh->type));
GNUNET_MQ_discard (ev);
}
if (NULL != mq->current_envelope)
@@ -861,9 +861,9 @@ GNUNET_MQ_destroy (struct GNUNET_MQ_Handle *mq)
/* we can only discard envelopes that
* are not queued! */
mq->current_envelope->parent_queue = NULL;
- GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
- "MQ destroy drops current message of type %u\n",
- ntohs (mq->current_envelope->mh->type));
+ LOG (GNUNET_ERROR_TYPE_DEBUG,
+ "MQ destroy drops current message of type %u\n",
+ ntohs (mq->current_envelope->mh->type));
GNUNET_MQ_discard (mq->current_envelope);
mq->current_envelope = NULL;
GNUNET_assert (0 < mq->queue_length);
@@ -946,9 +946,9 @@ GNUNET_MQ_send_cancel (struct GNUNET_MQ_Envelope *ev)
mq->envelope_tail,
mq->current_envelope);
- GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
- "mq: sending canceled message of type %u queue\n",
- ntohs(ev->mh->type));
+ LOG (GNUNET_ERROR_TYPE_DEBUG,
+ "sending canceled message of type %u queue\n",
+ ntohs(ev->mh->type));
mq->send_impl (mq,
mq->current_envelope->mh,
diff --git a/src/util/scheduler.c b/src/util/scheduler.c
index 7c1a8326a..e00ca444b 100644
--- a/src/util/scheduler.c
+++ b/src/util/scheduler.c
@@ -520,8 +520,8 @@ GNUNET_SCHEDULER_shutdown ()
{
struct GNUNET_SCHEDULER_Task *pos;
- GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
- "GNUNET_SCHEDULER_shutdown\n");
+ LOG (GNUNET_ERROR_TYPE_DEBUG,
+ "GNUNET_SCHEDULER_shutdown\n");
if (NULL != install_parent_control_task)
{
GNUNET_SCHEDULER_cancel (install_parent_control_task);
@@ -2023,9 +2023,9 @@ GNUNET_SCHEDULER_do_work (struct GNUNET_SCHEDULER_Handle
*sh)
* waiting for the timeout, so we handle this gracefully. It might
* also be a programming error in the driver though.
*/
- GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
- "GNUNET_SCHEDULER_do_work did not find any ready "
- "tasks and timeout has not been reached yet.\n");
+ LOG (GNUNET_ERROR_TYPE_DEBUG,
+ "GNUNET_SCHEDULER_do_work did not find any ready "
+ "tasks and timeout has not been reached yet.\n");
return GNUNET_NO;
}
/**
@@ -2376,8 +2376,8 @@ select_loop (struct GNUNET_SCHEDULER_Handle *sh, struct
DriverContext *context)
}
if (GNUNET_YES == GNUNET_SCHEDULER_do_work (sh))
{
- GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
- "scheduler has more tasks ready!\n");
+ LOG (GNUNET_ERROR_TYPE_DEBUG,
+ "scheduler has more tasks ready!\n");
}
}
GNUNET_NETWORK_fdset_destroy (rs);
--
To stop receiving notification emails like this one, please contact
address@hidden
- [GNUnet-SVN] [gnunet] branch master updated (74ccb6cad -> 1f46cd730), gnunet, 2018/03/03
- [GNUnet-SVN] [gnunet] 01/08: fix newline, reduce verbosity, gnunet, 2018/03/03
- [GNUnet-SVN] [gnunet] 02/08: add pin zone, remove obsolete script, gnunet, 2018/03/03
- [GNUnet-SVN] [gnunet] 04/08: handle case where resolver operation is cancelled during success callback, gnunet, 2018/03/03
- [GNUnet-SVN] [gnunet] 03/08: fix logging,
gnunet <=
- [GNUnet-SVN] [gnunet] 08/08: update developer manual to match GNS changes, gnunet, 2018/03/03
- [GNUnet-SVN] [gnunet] 07/08: update NSS plugin to hijack non-gnu/zkey tlds as well, gnunet, 2018/03/03
- [GNUnet-SVN] [gnunet] 06/08: update user-documentation to match new implementation, gnunet, 2018/03/03
- [GNUnet-SVN] [gnunet] 05/08: eliminate .gnu from GNS, gnunet, 2018/03/03