From 2eb28778d2e0d365075aafe402c36d95ba9bd49c Mon Sep 17 00:00:00 2001 From: t3sserakt Date: Sun, 29 Oct 2017 02:28:16 +0100 Subject: [PATCH] added logging --- src/util/client.c | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/src/util/client.c b/src/util/client.c index 90bc837d7..cf75dffbc 100644 --- a/src/util/client.c +++ b/src/util/client.c @@ -261,6 +261,8 @@ transmit_ready (void *cls) pos = (const char *) cstate->msg; len = ntohs (cstate->msg->size); GNUNET_assert (cstate->msg_off < len); + GNUNET_log (GNUNET_ERROR_TYPE_WARNING, + "client: message of type %u trying to send with socket %p\n", ntohs(cstate->msg->type), cstate->sock); RETRY: ret = GNUNET_NETWORK_socket_send (cstate->sock, &pos[cstate->msg_off], @@ -380,8 +382,11 @@ connection_client_destroy_impl (struct GNUNET_MQ_Handle *mq, GNUNET_SCHEDULER_cancel (cstate->recv_task); if (NULL != cstate->retry_task) GNUNET_SCHEDULER_cancel (cstate->retry_task); - if (NULL != cstate->sock) + if (NULL != cstate->sock){ + GNUNET_log (GNUNET_ERROR_TYPE_WARNING, + "client: destroying socket: %p\n", cstate->sock); GNUNET_NETWORK_socket_close (cstate->sock); + } cancel_aps (cstate); GNUNET_free (cstate->service_name); GNUNET_free_non_null (cstate->hostname); @@ -520,6 +525,10 @@ try_unixpath (const char *service_name, sock = GNUNET_NETWORK_socket_create (AF_UNIX, SOCK_STREAM, 0); + + GNUNET_log (GNUNET_ERROR_TYPE_MESSAGE, + "client: socket created: %p\n", sock); + if ( (NULL != sock) && ( (GNUNET_OK == GNUNET_NETWORK_socket_connect (sock, @@ -805,7 +814,7 @@ connection_client_send_impl (struct GNUNET_MQ_Handle *mq, cstate->msg_off = 0; if (NULL == cstate->sock){ GNUNET_log (GNUNET_ERROR_TYPE_WARNING, - "client: waiting for socket\n"); + "client: message of type %u waiting for socket\n",ntohs(msg->type)); return; /* still waiting for connection */ } cstate->send_task -- 2.25.1