log plugin involved in slow transmissions
authorChristian Grothoff <christian@grothoff.org>
Sat, 17 Oct 2015 20:34:19 +0000 (20:34 +0000)
committerChristian Grothoff <christian@grothoff.org>
Sat, 17 Oct 2015 20:34:19 +0000 (20:34 +0000)
src/transport/gnunet-service-transport_clients.c
src/transport/gnunet-service-transport_neighbours.c
src/transport/gnunet-service-transport_neighbours.h

index 12a5dc5574546e7e1b424fe239016242982ee67f..103c6fd0ab661e85a5b3f64c3d0da4205a7fc066 100644 (file)
@@ -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))
   {
index ad2947418167790f4fb34cc595a6bcd92bdf4438..442935993bda63897e0240640138839021fb4291 100644 (file)
@@ -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;
index 687776f8872d944278d165ec6e5f5817ec98421f..a6c9f2f53c196c263bbc8e526c8477bf24054930 100644 (file)
@@ -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);