From d3880dd89a6aa28902c95708d9ab2126c96b57c1 Mon Sep 17 00:00:00 2001 From: Christian Grothoff Date: Wed, 25 Jan 2017 10:16:35 +0100 Subject: [PATCH] nicer logging --- src/cadet/gnunet-service-cadet-new_channel.c | 12 +++++++++--- src/cadet/gnunet-service-cadet-new_tunnels.c | 4 ++-- 2 files changed, 11 insertions(+), 5 deletions(-) diff --git a/src/cadet/gnunet-service-cadet-new_channel.c b/src/cadet/gnunet-service-cadet-new_channel.c index cc59ced52..0c6241817 100644 --- a/src/cadet/gnunet-service-cadet-new_channel.c +++ b/src/cadet/gnunet-service-cadet-new_channel.c @@ -1498,17 +1498,23 @@ GCCH_handle_local_ack (struct CadetChannel *ch, else GNUNET_assert (0); ccc->client_ready = GNUNET_YES; - LOG (GNUNET_ERROR_TYPE_DEBUG, - "Got LOCAL_ACK, client ready to receive more data!\n"); com = ccc->head_recv; if (NULL == com) + { + LOG (GNUNET_ERROR_TYPE_DEBUG, + "Got LOCAL_ACK, %s-%X ready to receive more data (but none pending)!\n", + GSC_2s (ccc->c), + ntohl (ccc->ccn.channel_of_client)); return; /* none pending */ + } if ( (com->mid.mid != ch->mid_recv.mid) && (GNUNET_NO == ch->out_of_order) ) return; /* missing next one in-order */ GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, - "Passing payload message to client on %s\n", + "Got LOCAL ACK, passing payload message to %s-%X on %s\n", + GSC_2s (ccc->c), + ntohl (ccc->ccn.channel_of_client), GCCH_2s (ch)); /* all good, pass next message to client */ diff --git a/src/cadet/gnunet-service-cadet-new_tunnels.c b/src/cadet/gnunet-service-cadet-new_tunnels.c index c6a8b8962..fd8335486 100644 --- a/src/cadet/gnunet-service-cadet-new_tunnels.c +++ b/src/cadet/gnunet-service-cadet-new_tunnels.c @@ -1704,7 +1704,7 @@ try_send_normal_payload (struct CadetTunnel *t, { /* no messages pending right now */ LOG (GNUNET_ERROR_TYPE_DEBUG, - "Not sending payload of tunnel %s on ready connection %s (nothing pending)\n", + "Not sending payload of %s on ready %s (nothing pending)\n", GCT_2s (t), GCC_2s (ct->cc)); return; @@ -1718,7 +1718,7 @@ try_send_normal_payload (struct CadetTunnel *t, *tq->cid = *GCC_get_id (ct->cc); ct->is_ready = GNUNET_NO; LOG (GNUNET_ERROR_TYPE_DEBUG, - "Sending payload of tunnel %s on connection %s\n", + "Sending payload of %s on %s\n", GCT_2s (t), GCC_2s (ct->cc)); GCC_transmit (ct->cc, -- 2.25.1