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) | |
download | gnunet-e1e838cdb804ed54aedccf5fce030ecc066028cd.tar.gz gnunet-e1e838cdb804ed54aedccf5fce030ecc066028cd.zip |
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 0d90c5d10..4c2a74212 100644 --- a/src/util/mst.c +++ b/src/util/mst.c | |||
@@ -1,6 +1,6 @@ | |||
1 | /* | 1 | /* |
2 | This file is part of GNUnet. | 2 | This file is part of GNUnet. |
3 | Copyright (C) 2010, 2016 GNUnet e.V. | 3 | Copyright (C) 2010, 2016, 2017 GNUnet e.V. |
4 | 4 | ||
5 | GNUnet is free software; you can redistribute it and/or modify | 5 | GNUnet is free software; you can redistribute it and/or modify |
6 | it under the terms of the GNU General Public License as published | 6 | it under the terms of the GNU General Public License as published |
@@ -229,9 +229,15 @@ do_align: | |||
229 | if (one_shot == GNUNET_YES) | 229 | if (one_shot == GNUNET_YES) |
230 | one_shot = GNUNET_SYSERR; | 230 | one_shot = GNUNET_SYSERR; |
231 | mst->off += want; | 231 | mst->off += want; |
232 | if (GNUNET_SYSERR == mst->cb (mst->cb_cls, | 232 | if (GNUNET_SYSERR == mst->cb (mst->cb_cls, |
233 | hdr)) | 233 | hdr)) |
234 | { | ||
235 | GNUNET_log (GNUNET_ERROR_TYPE_WARNING, | ||
236 | "Failure processing message of type %u and size %u\n", | ||
237 | ntohs (hdr->type), | ||
238 | ntohs (hdr->size)); | ||
234 | return GNUNET_SYSERR; | 239 | return GNUNET_SYSERR; |
240 | } | ||
235 | if (mst->off == mst->pos) | 241 | if (mst->off == mst->pos) |
236 | { | 242 | { |
237 | /* reset to beginning of buffer, it's free right now! */ | 243 | /* reset to beginning of buffer, it's free right now! */ |
@@ -273,7 +279,13 @@ do_align: | |||
273 | one_shot = GNUNET_SYSERR; | 279 | one_shot = GNUNET_SYSERR; |
274 | if (GNUNET_SYSERR == mst->cb (mst->cb_cls, | 280 | if (GNUNET_SYSERR == mst->cb (mst->cb_cls, |
275 | hdr)) | 281 | hdr)) |
282 | { | ||
283 | GNUNET_log (GNUNET_ERROR_TYPE_WARNING, | ||
284 | "Failure processing message of type %u and size %u\n", | ||
285 | ntohs (hdr->type), | ||
286 | ntohs (hdr->size)); | ||
276 | return GNUNET_SYSERR; | 287 | return GNUNET_SYSERR; |
288 | } | ||
277 | buf += want; | 289 | buf += want; |
278 | size -= want; | 290 | size -= want; |
279 | } | 291 | } |