gnunet-svn
[Top][All Lists]
Advanced

[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



reply via email to

[Prev in Thread] Current Thread [Next in Thread]