[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[GNUnet-SVN] [gnunet] 15/64: better logging of message processing errors
From: |
gnunet |
Subject: |
[GNUnet-SVN] [gnunet] 15/64: better logging of message processing errors in mq handling |
Date: |
Sat, 30 Dec 2017 20:58:00 +0100 |
This is an automated email from the git hooks/post-receive script.
lurchi pushed a commit to branch master
in repository gnunet.
commit e1e838cdb804ed54aedccf5fce030ecc066028cd
Author: Christian Grothoff <address@hidden>
AuthorDate: Sun Oct 29 11:24:52 2017 +0100
better logging of message processing errors in mq handling
---
src/util/mq.c | 15 ++++++++++++---
src/util/mst.c | 18 +++++++++++++++---
2 files changed, 27 insertions(+), 6 deletions(-)
diff --git a/src/util/mq.c b/src/util/mq.c
index c7ed5330e..6ad6b82eb 100644
--- a/src/util/mq.c
+++ b/src/util/mq.c
@@ -221,8 +221,10 @@ GNUNET_MQ_inject_message (struct GNUNET_MQ_Handle *mq,
uint16_t mtype = ntohs (mh->type);
LOG (GNUNET_ERROR_TYPE_DEBUG,
- "Received message of type %u and size %u\n",
- mtype, msize);
+ "Queue %p received message of type %u and size %u\n",
+ mq,
+ mtype,
+ msize);
if (NULL == mq->handlers)
goto done;
@@ -359,7 +361,8 @@ GNUNET_MQ_send (struct GNUNET_MQ_Handle *mq,
mq->current_envelope = ev;
GNUNET_log (GNUNET_ERROR_TYPE_WARNING,
- "mq: sending message of type %u, queue empty\n",
ntohs(ev->mh->type));
+ "mq: sending message of type %u, queue empty\n",
+ ntohs(ev->mh->type));
mq->send_impl (mq,
ev->mh,
@@ -848,6 +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_INFO,
+ "MQ destroy drops message of type %u\n",
+ ntohs (ev->mh->type));
GNUNET_MQ_discard (ev);
}
if (NULL != mq->current_envelope)
@@ -855,6 +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_INFO,
+ "MQ destroy drops 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);
diff --git a/src/util/mst.c b/src/util/mst.c
index 0d90c5d10..4c2a74212 100644
--- a/src/util/mst.c
+++ b/src/util/mst.c
@@ -1,6 +1,6 @@
/*
This file is part of GNUnet.
- Copyright (C) 2010, 2016 GNUnet e.V.
+ Copyright (C) 2010, 2016, 2017 GNUnet e.V.
GNUnet is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published
@@ -229,9 +229,15 @@ do_align:
if (one_shot == GNUNET_YES)
one_shot = GNUNET_SYSERR;
mst->off += want;
- if (GNUNET_SYSERR == mst->cb (mst->cb_cls,
- hdr))
+ if (GNUNET_SYSERR == mst->cb (mst->cb_cls,
+ hdr))
+ {
+ GNUNET_log (GNUNET_ERROR_TYPE_WARNING,
+ "Failure processing message of type %u and size %u\n",
+ ntohs (hdr->type),
+ ntohs (hdr->size));
return GNUNET_SYSERR;
+ }
if (mst->off == mst->pos)
{
/* reset to beginning of buffer, it's free right now! */
@@ -273,7 +279,13 @@ do_align:
one_shot = GNUNET_SYSERR;
if (GNUNET_SYSERR == mst->cb (mst->cb_cls,
hdr))
+ {
+ GNUNET_log (GNUNET_ERROR_TYPE_WARNING,
+ "Failure processing message of type %u and size %u\n",
+ ntohs (hdr->type),
+ ntohs (hdr->size));
return GNUNET_SYSERR;
+ }
buf += want;
size -= want;
}
--
To stop receiving notification emails like this one, please contact
address@hidden
- [GNUnet-SVN] [gnunet] 01/64: trying to fix test_social and social service with a lot of debug outputs, (continued)
- [GNUnet-SVN] [gnunet] 01/64: trying to fix test_social and social service with a lot of debug outputs, gnunet, 2017/12/30
- [GNUnet-SVN] [gnunet] 05/64: we were on the wood way, gnunet, 2017/12/30
- [GNUnet-SVN] [gnunet] 03/64: don't call GNUNET_SERVICE_client_continue twice; maybe fix bug resulting from destroying MQ too early, gnunet, 2017/12/30
- [GNUnet-SVN] [gnunet] 04/64: -we no enter to place, gnunet, 2017/12/30
- [GNUnet-SVN] [gnunet] 13/64: clarify use of client_drop, gnunet, 2017/12/30
- [GNUnet-SVN] [gnunet] 17/64: logging, cosmetic fixes, gnunet, 2017/12/30
- [GNUnet-SVN] [gnunet] 09/64: misc social hacking with Lurchi, gnunet, 2017/12/30
- [GNUnet-SVN] [gnunet] 18/64: minor style fix, gnunet, 2017/12/30
- [GNUnet-SVN] [gnunet] 10/64: added logging, gnunet, 2017/12/30
- [GNUnet-SVN] [gnunet] 14/64: handle service disconnect without crashing if reconnect fails, gnunet, 2017/12/30
- [GNUnet-SVN] [gnunet] 15/64: better logging of message processing errors in mq handling,
gnunet <=
- [GNUnet-SVN] [gnunet] 08/64: added logging, gnunet, 2017/12/30
- [GNUnet-SVN] [gnunet] 16/64: do handle CTRL-C properly in test_social, gnunet, 2017/12/30
- [GNUnet-SVN] [gnunet] 12/64: fix wrong condition, do only drop if it has not been dropped, instead of causing double-drop, gnunet, 2017/12/30
- [GNUnet-SVN] [gnunet] 11/64: Merge branch 'fix_social' of gnunet.org:gnunet into fix_social, gnunet, 2017/12/30
- [GNUnet-SVN] [gnunet] 20/64: Fix tcp on exit crash -- could have sworn I fixed this one before, gnunet, 2017/12/30
- [GNUnet-SVN] [gnunet] 21/64: Merge branch 'fix_social' of gnunet.org:gnunet into fix_social, gnunet, 2017/12/30
- [GNUnet-SVN] [gnunet] 25/64: Merge branch 'fix_social' of gnunet.org:gnunet into fix_social, gnunet, 2017/12/30
- [GNUnet-SVN] [gnunet] 35/64: added FIXMEs, gnunet, 2017/12/30
- [GNUnet-SVN] [gnunet] 32/64: commented out wrong message type, gnunet, 2017/12/30
- [GNUnet-SVN] [gnunet] 40/64: revert commit 6490b5f31e58e9ec008f8c5ceda28f6054f1bbba, gnunet, 2017/12/30