[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[GNUnet-SVN] [gnunet] 08/64: added logging
From: |
gnunet |
Subject: |
[GNUnet-SVN] [gnunet] 08/64: added logging |
Date: |
Sat, 30 Dec 2017 20:57:53 +0100 |
This is an automated email from the git hooks/post-receive script.
lurchi pushed a commit to branch master
in repository gnunet.
commit b822e98f7ea722f7f0604bd9cef9aa436e7bab7d
Author: t3sserakt <address@hidden>
AuthorDate: Mon Oct 23 04:16:43 2017 +0200
added logging
---
src/social/social_api.c | 6 ++++--
src/util/client.c | 16 ++++++++++++++--
2 files changed, 18 insertions(+), 4 deletions(-)
diff --git a/src/social/social_api.c b/src/social/social_api.c
index 4b3655de4..923ab5e33 100644
--- a/src/social/social_api.c
+++ b/src/social/social_api.c
@@ -1082,9 +1082,11 @@ place_cleanup (struct GNUNET_SOCIAL_Place *plc)
void
place_disconnect (struct GNUNET_SOCIAL_Place *plc)
{
+ struct GNUNET_HashCode place_pub_hash;
+ GNUNET_CRYPTO_hash (&plc->pub_key, sizeof (plc->pub_key), &place_pub_hash);
GNUNET_log (GNUNET_ERROR_TYPE_WARNING,
- "place_disconnect, plc = %p\n",
- plc);
+ "place_disconnect, plc = %s\n",
+ GNUNET_h2s (&place_pub_hash));
if (NULL != plc->mq)
{
struct GNUNET_MQ_Envelope *env = GNUNET_MQ_get_last_envelope (plc->mq);
diff --git a/src/util/client.c b/src/util/client.c
index 3d74bff33..90bc837d7 100644
--- a/src/util/client.c
+++ b/src/util/client.c
@@ -267,8 +267,13 @@ transmit_ready (void *cls)
len - cstate->msg_off);
if (-1 == ret)
{
- if (EINTR == errno)
+ GNUNET_log (GNUNET_ERROR_TYPE_WARNING,
+ "client: error during sending message of type %u\n",
ntohs(cstate->msg->type));
+ if (EINTR == errno){
+ GNUNET_log (GNUNET_ERROR_TYPE_WARNING,
+ "client: retrying message of type %u\n",
ntohs(cstate->msg->type));
goto RETRY;
+ }
GNUNET_MQ_inject_error (cstate->mq,
GNUNET_MQ_ERROR_WRITE);
return;
@@ -277,6 +282,8 @@ transmit_ready (void *cls)
cstate->msg_off += ret;
if (cstate->msg_off < len)
{
+ GNUNET_log (GNUNET_ERROR_TYPE_WARNING,
+ "client: 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,
@@ -286,6 +293,8 @@ transmit_ready (void *cls)
GNUNET_MQ_impl_send_in_flight (cstate->mq);
return;
}
+ GNUNET_log (GNUNET_ERROR_TYPE_WARNING,
+ "client: sending message of type %u successful\n",
ntohs(cstate->msg->type));
cstate->msg = NULL;
GNUNET_MQ_impl_send_continue (cstate->mq);
}
@@ -794,8 +803,11 @@ connection_client_send_impl (struct GNUNET_MQ_Handle *mq,
GNUNET_assert (NULL == cstate->send_task);
cstate->msg = msg;
cstate->msg_off = 0;
- if (NULL == cstate->sock)
+ if (NULL == cstate->sock){
+ GNUNET_log (GNUNET_ERROR_TYPE_WARNING,
+ "client: waiting for socket\n");
return; /* still waiting for connection */
+ }
cstate->send_task
= GNUNET_SCHEDULER_add_write_net (GNUNET_TIME_UNIT_FOREVER_REL,
cstate->sock,
--
To stop receiving notification emails like this one, please contact
address@hidden
- [GNUnet-SVN] [gnunet] 05/64: we were on the wood way, (continued)
- [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, 2017/12/30
- [GNUnet-SVN] [gnunet] 08/64: added logging,
gnunet <=
- [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
- [GNUnet-SVN] [gnunet] 23/64: improve documentation, gnunet, 2017/12/30