summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2015-10-17 20:34:19 +0000
committerChristian Grothoff <christian@grothoff.org>2015-10-17 20:34:19 +0000
commit96e83adb54d5be78b5a5d2245ddd334096c51c9e (patch)
tree0a62a51537a1078c78d2211f496609001dabe1f8
parent41460fb1154acb7ce90bad5e32d13dcf985c6eea (diff)
log plugin involved in slow transmissions
-rw-r--r--src/transport/gnunet-service-transport_clients.c12
-rw-r--r--src/transport/gnunet-service-transport_neighbours.c2
-rw-r--r--src/transport/gnunet-service-transport_neighbours.h2
3 files changed, 10 insertions, 6 deletions
diff --git a/src/transport/gnunet-service-transport_clients.c b/src/transport/gnunet-service-transport_clients.c
index 12a5dc557..103c6fd0a 100644
--- a/src/transport/gnunet-service-transport_clients.c
+++ b/src/transport/gnunet-service-transport_clients.c
@@ -714,26 +714,30 @@ handle_send_transmit_continuation (void *cls,
struct SendTransmitContinuationContext *stcc = cls;
struct SendOkMessage send_ok_msg;
struct GNUNET_TIME_Relative delay;
+ const struct GNUNET_HELLO_Address *addr;
delay = GNUNET_TIME_absolute_get_duration (stcc->send_time);
+ addr = GST_neighbour_get_current_address (&stcc->target);
if (delay.rel_value_us > GNUNET_CONSTANTS_LATENCY_WARN.rel_value_us)
GNUNET_log (GNUNET_ERROR_TYPE_WARNING,
- "It took us %s to send %u/%u bytes to %s (%d)\n",
+ "It took us %s to send %u/%u bytes to %s (%d, %s)\n",
GNUNET_STRINGS_relative_time_to_string (delay,
GNUNET_YES),
(unsigned int) bytes_payload,
(unsigned int) bytes_on_wire,
GNUNET_i2s (&stcc->target),
- success);
+ success,
+ addr->transport_name);
else
GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
- "It took us %s to send %u/%u bytes to %s (%d)\n",
+ "It took us %s to send %u/%u bytes to %s (%d, %s)\n",
GNUNET_STRINGS_relative_time_to_string (delay,
GNUNET_YES),
(unsigned int) bytes_payload,
(unsigned int) bytes_on_wire,
GNUNET_i2s (&stcc->target),
- success);
+ success,
+ addr->transport_name);
if (GST_neighbours_test_connected (&stcc->target))
{
diff --git a/src/transport/gnunet-service-transport_neighbours.c b/src/transport/gnunet-service-transport_neighbours.c
index ad2947418..442935993 100644
--- a/src/transport/gnunet-service-transport_neighbours.c
+++ b/src/transport/gnunet-service-transport_neighbours.c
@@ -3894,7 +3894,7 @@ GST_neighbours_force_disconnect (const struct GNUNET_PeerIdentity *target)
* @param peer
* @return address currently used
*/
-struct GNUNET_HELLO_Address *
+const struct GNUNET_HELLO_Address *
GST_neighbour_get_current_address (const struct GNUNET_PeerIdentity *peer)
{
struct NeighbourMapEntry *n;
diff --git a/src/transport/gnunet-service-transport_neighbours.h b/src/transport/gnunet-service-transport_neighbours.h
index 687776f88..a6c9f2f53 100644
--- a/src/transport/gnunet-service-transport_neighbours.h
+++ b/src/transport/gnunet-service-transport_neighbours.h
@@ -291,7 +291,7 @@ GST_neighbours_handle_session_ack (const struct GNUNET_MessageHeader *message,
* @param peer
* @return address currently used
*/
-struct GNUNET_HELLO_Address *
+const struct GNUNET_HELLO_Address *
GST_neighbour_get_current_address (const struct GNUNET_PeerIdentity *peer);