diff options
author | Christian Grothoff <christian@grothoff.org> | 2017-10-29 11:24:52 +0100 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2017-10-29 11:24:52 +0100 |
commit | e1e838cdb804ed54aedccf5fce030ecc066028cd (patch) | |
tree | 47998025c07d096fd2b567e72d3ef3fc51d4171c /src/util/mst.c | |
parent | da376896f525195c469cee2d1a4a5cb57ad6b6f8 (diff) |
better logging of message processing errors in mq handling
Diffstat (limited to 'src/util/mst.c')
-rw-r--r-- | src/util/mst.c | 18 |
1 files changed, 15 insertions, 3 deletions
diff --git a/src/util/mst.c b/src/util/mst.c index 0d90c5d105..4c2a74212c 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; } |