aboutsummaryrefslogtreecommitdiff
path: root/src/transport/plugin_transport_tcp.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/transport/plugin_transport_tcp.c')
-rw-r--r--src/transport/plugin_transport_tcp.c29
1 files changed, 13 insertions, 16 deletions
diff --git a/src/transport/plugin_transport_tcp.c b/src/transport/plugin_transport_tcp.c
index 19ce855d8..32bc65047 100644
--- a/src/transport/plugin_transport_tcp.c
+++ b/src/transport/plugin_transport_tcp.c
@@ -862,9 +862,12 @@ tcp_plugin_disconnect_session (void *cls,
862 { 862 {
863 LOG (GNUNET_ERROR_TYPE_DEBUG, 863 LOG (GNUNET_ERROR_TYPE_DEBUG,
864 (NULL != pm->transmit_cont) 864 (NULL != pm->transmit_cont)
865 ? "Could not deliver message to `%4s'.\n" 865 ? "Could not deliver message to `%s' at %s.\n"
866 : "Could not deliver message to `%4s', notifying.\n", 866 : "Could not deliver message to `%s' at %s, notifying.\n",
867 GNUNET_i2s (&session->target)); 867 GNUNET_i2s (&session->target),
868 tcp_plugin_address_to_string (session->plugin,
869 session->address->address,
870 session->address->address_length));
868 GNUNET_STATISTICS_update (session->plugin->env->stats, 871 GNUNET_STATISTICS_update (session->plugin->env->stats,
869 gettext_noop ("# bytes currently in TCP buffers"), 872 gettext_noop ("# bytes currently in TCP buffers"),
870 -(int64_t) pm->message_size, GNUNET_NO); 873 -(int64_t) pm->message_size, GNUNET_NO);
@@ -1003,8 +1006,11 @@ create_session (struct Plugin *plugin,
1003 GNUNET_assert (NULL == client); 1006 GNUNET_assert (NULL == client);
1004 1007
1005 LOG (GNUNET_ERROR_TYPE_DEBUG, 1008 LOG (GNUNET_ERROR_TYPE_DEBUG,
1006 "Creating new session for peer `%4s'\n", 1009 "Creating new session for peer `%4s' at address %s\n",
1007 GNUNET_i2s (&address->peer)); 1010 GNUNET_i2s (&address->peer),
1011 tcp_plugin_address_to_string (plugin,
1012 address->address,
1013 address->address_length));
1008 session = GNUNET_new (struct Session); 1014 session = GNUNET_new (struct Session);
1009 session->last_activity = GNUNET_TIME_absolute_get (); 1015 session->last_activity = GNUNET_TIME_absolute_get ();
1010 session->plugin = plugin; 1016 session->plugin = plugin;
@@ -1174,9 +1180,10 @@ do_transmit (void *cls, size_t size, void *buf)
1174 session->bytes_in_queue -= pos->message_size; 1180 session->bytes_in_queue -= pos->message_size;
1175 GNUNET_assert(size >= pos->message_size); 1181 GNUNET_assert(size >= pos->message_size);
1176 LOG (GNUNET_ERROR_TYPE_DEBUG, 1182 LOG (GNUNET_ERROR_TYPE_DEBUG,
1177 "Transmitting message of type %u size %u to %s\n", 1183 "Transmitting message of type %u size %u to peer %s at %s\n",
1178 ntohs (((struct GNUNET_MessageHeader *) pos->msg)->type), 1184 ntohs (((struct GNUNET_MessageHeader *) pos->msg)->type),
1179 pos->message_size, 1185 pos->message_size,
1186 GNUNET_i2s (&session->target),
1180 tcp_plugin_address_to_string (session->plugin, 1187 tcp_plugin_address_to_string (session->plugin,
1181 session->address->address, 1188 session->address->address,
1182 session->address->address_length)); 1189 session->address->address_length));
@@ -1215,9 +1222,6 @@ do_transmit (void *cls, size_t size, void *buf)
1215 } 1222 }
1216 GNUNET_assert (NULL == hd); 1223 GNUNET_assert (NULL == hd);
1217 GNUNET_assert (NULL == tl); 1224 GNUNET_assert (NULL == tl);
1218 LOG (GNUNET_ERROR_TYPE_DEBUG,
1219 "Transmitting %u bytes\n",
1220 ret);
1221 GNUNET_STATISTICS_update (plugin->env->stats, 1225 GNUNET_STATISTICS_update (plugin->env->stats,
1222 gettext_noop ("# bytes currently in TCP buffers"), 1226 gettext_noop ("# bytes currently in TCP buffers"),
1223 - (int64_t) ret, 1227 - (int64_t) ret,
@@ -1767,13 +1771,6 @@ tcp_plugin_get_session (void *cls,
1767 &session->target, 1771 &session->target,
1768 session, 1772 session,
1769 GNUNET_CONTAINER_MULTIHASHMAPOPTION_MULTIPLE); 1773 GNUNET_CONTAINER_MULTIHASHMAPOPTION_MULTIPLE);
1770 LOG (GNUNET_ERROR_TYPE_DEBUG,
1771 "Creating new session for `%s' address `%s' session %p\n",
1772 GNUNET_i2s (&address->peer),
1773 tcp_plugin_address_to_string (plugin,
1774 address->address,
1775 address->address_length),
1776 session);
1777 /* Send TCP Welcome */ 1774 /* Send TCP Welcome */
1778 process_pending_messages (session); 1775 process_pending_messages (session);
1779 1776