diff options
author | Christian Grothoff <christian@grothoff.org> | 2011-10-17 13:55:08 +0000 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2011-10-17 13:55:08 +0000 |
commit | 7402a01c58bc72833e5a126bc204a21d8db908d2 (patch) | |
tree | 3ec24bbbd15c2a42bdf089dc76c3bd3a0ddd487b /src/transport/plugin_transport_tcp.c | |
parent | 2e30d52c8b5dfa6587b3cfc94ca035d51ff7b7af (diff) | |
download | gnunet-7402a01c58bc72833e5a126bc204a21d8db908d2.tar.gz gnunet-7402a01c58bc72833e5a126bc204a21d8db908d2.zip |
removing bad reserved field, small refactoring
Diffstat (limited to 'src/transport/plugin_transport_tcp.c')
-rw-r--r-- | src/transport/plugin_transport_tcp.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/transport/plugin_transport_tcp.c b/src/transport/plugin_transport_tcp.c index d3391e1b2..546c2aa36 100644 --- a/src/transport/plugin_transport_tcp.c +++ b/src/transport/plugin_transport_tcp.c | |||
@@ -696,6 +696,10 @@ do_transmit (void *cls, size_t size, void *buf) | |||
696 | GNUNET_CONTAINER_DLL_remove (session->pending_messages_head, | 696 | GNUNET_CONTAINER_DLL_remove (session->pending_messages_head, |
697 | session->pending_messages_tail, pos); | 697 | session->pending_messages_tail, pos); |
698 | GNUNET_assert (size >= pos->message_size); | 698 | GNUNET_assert (size >= pos->message_size); |
699 | GNUNET_log_from (GNUNET_ERROR_TYPE_DEBUG, | ||
700 | "tcp", | ||
701 | "Transmitting message of type %u\n", | ||
702 | ntohs (((struct GNUNET_MessageHeader*)pos->msg)->type)); | ||
699 | /* FIXME: this memcpy can be up to 7% of our total runtime */ | 703 | /* FIXME: this memcpy can be up to 7% of our total runtime */ |
700 | memcpy (cbuf, pos->msg, pos->message_size); | 704 | memcpy (cbuf, pos->msg, pos->message_size); |
701 | cbuf += pos->message_size; | 705 | cbuf += pos->message_size; |
@@ -1706,7 +1710,7 @@ handle_tcp_data (void *cls, struct GNUNET_SERVER_Client *client, | |||
1706 | return; | 1710 | return; |
1707 | } | 1711 | } |
1708 | session->last_activity = GNUNET_TIME_absolute_get (); | 1712 | session->last_activity = GNUNET_TIME_absolute_get (); |
1709 | #if DEBUG_TCP > 1 | 1713 | #if DEBUG_TCP |
1710 | GNUNET_log_from (GNUNET_ERROR_TYPE_DEBUG, "tcp", | 1714 | GNUNET_log_from (GNUNET_ERROR_TYPE_DEBUG, "tcp", |
1711 | "Passing %u bytes of type %u from `%4s' to transport service.\n", | 1715 | "Passing %u bytes of type %u from `%4s' to transport service.\n", |
1712 | (unsigned int) ntohs (message->size), | 1716 | (unsigned int) ntohs (message->size), |