From 2493fd14fd65ac7be857cf9c7fd4d189cb91cbaf Mon Sep 17 00:00:00 2001 From: Christian Grothoff Date: Tue, 27 Oct 2015 14:18:14 +0000 Subject: [PATCH] -extra logging for #4025 --- src/transport/gnunet-service-transport_clients.c | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/src/transport/gnunet-service-transport_clients.c b/src/transport/gnunet-service-transport_clients.c index 538dd15ea..3a7f10337 100644 --- a/src/transport/gnunet-service-transport_clients.c +++ b/src/transport/gnunet-service-transport_clients.c @@ -693,6 +693,11 @@ struct SendTransmitContinuationContext * At what time did we receive the message? */ struct GNUNET_TIME_Absolute send_time; + + /** + * Unique ID, for logging. + */ + unsigned long long uuid; }; @@ -742,6 +747,9 @@ handle_send_transmit_continuation (void *cls, if (GST_neighbours_test_connected (&stcc->target)) { /* Only send confirmation if we are still connected */ + GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, + "Sending SEND_OK for transmission request %llu\n", + stcc->uuid); send_ok_msg.header.size = htons (sizeof (send_ok_msg)); send_ok_msg.header.type = htons (GNUNET_MESSAGE_TYPE_TRANSPORT_SEND_OK); send_ok_msg.bytes_msg = htonl (bytes_payload); @@ -769,6 +777,7 @@ clients_handle_send (void *cls, struct GNUNET_SERVER_Client *client, const struct GNUNET_MessageHeader *message) { + static unsigned long long uuid_gen; const struct OutboundMessage *obm; const struct GNUNET_MessageHeader *obmm; struct SendTransmitContinuationContext *stcc; @@ -821,7 +830,8 @@ clients_handle_send (void *cls, return; } GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, - "Received SEND request for `%s' and first message of type %u and total size %u\n", + "Received SEND request %llu for `%s' and first message of type %u and total size %u\n", + uuid_gen, GNUNET_i2s (&obm->peer), ntohs (obmm->type), msize); @@ -831,6 +841,7 @@ clients_handle_send (void *cls, stcc->target = obm->peer; stcc->client = client; stcc->send_time = GNUNET_TIME_absolute_get (); + stcc->uuid = uuid_gen++; GNUNET_SERVER_client_keep (client); GST_manipulation_send (&obm->peer, obmm, -- 2.25.1