diff options
author | Christian Grothoff <christian@grothoff.org> | 2011-10-17 12:10:02 +0000 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2011-10-17 12:10:02 +0000 |
commit | 7607c33464325ae6974ca2a685940b1438120fe2 (patch) | |
tree | 9dbe388b27d38d709d2535158324ca15d9247719 /src/transport/plugin_transport_tcp.c | |
parent | bbd9867e477ed9a528b0d9a17c9671032395da67 (diff) | |
download | gnunet-7607c33464325ae6974ca2a685940b1438120fe2.tar.gz gnunet-7607c33464325ae6974ca2a685940b1438120fe2.zip |
simplify
Diffstat (limited to 'src/transport/plugin_transport_tcp.c')
-rw-r--r-- | src/transport/plugin_transport_tcp.c | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/src/transport/plugin_transport_tcp.c b/src/transport/plugin_transport_tcp.c index 8856b9262..d3391e1b2 100644 --- a/src/transport/plugin_transport_tcp.c +++ b/src/transport/plugin_transport_tcp.c | |||
@@ -701,7 +701,7 @@ do_transmit (void *cls, size_t size, void *buf) | |||
701 | cbuf += pos->message_size; | 701 | cbuf += pos->message_size; |
702 | ret += pos->message_size; | 702 | ret += pos->message_size; |
703 | size -= pos->message_size; | 703 | size -= pos->message_size; |
704 | GNUNET_CONTAINER_DLL_insert_after (hd, tl, tl, pos); | 704 | GNUNET_CONTAINER_DLL_insert_tail (hd, tl, pos); |
705 | } | 705 | } |
706 | /* schedule 'continuation' before callbacks so that callbacks that | 706 | /* schedule 'continuation' before callbacks so that callbacks that |
707 | * cancel everything don't cause us to use a session that no longer | 707 | * cancel everything don't cause us to use a session that no longer |
@@ -1066,8 +1066,7 @@ tcp_plugin_send (void *cls, const struct GNUNET_PeerIdentity *target, | |||
1066 | pm->transmit_cont_cls = cont_cls; | 1066 | pm->transmit_cont_cls = cont_cls; |
1067 | 1067 | ||
1068 | /* append pm to pending_messages list */ | 1068 | /* append pm to pending_messages list */ |
1069 | GNUNET_CONTAINER_DLL_insert_after (session->pending_messages_head, | 1069 | GNUNET_CONTAINER_DLL_insert_tail (session->pending_messages_head, |
1070 | session->pending_messages_tail, | ||
1071 | session->pending_messages_tail, pm); | 1070 | session->pending_messages_tail, pm); |
1072 | 1071 | ||
1073 | GNUNET_assert (GNUNET_CONTAINER_multihashmap_put | 1072 | GNUNET_assert (GNUNET_CONTAINER_multihashmap_put |
@@ -1151,9 +1150,8 @@ tcp_plugin_send (void *cls, const struct GNUNET_PeerIdentity *target, | |||
1151 | pm->transmit_cont_cls = cont_cls; | 1150 | pm->transmit_cont_cls = cont_cls; |
1152 | 1151 | ||
1153 | /* append pm to pending_messages list */ | 1152 | /* append pm to pending_messages list */ |
1154 | GNUNET_CONTAINER_DLL_insert_after (session->pending_messages_head, | 1153 | GNUNET_CONTAINER_DLL_insert_tail (session->pending_messages_head, |
1155 | session->pending_messages_tail, | 1154 | session->pending_messages_tail, pm); |
1156 | session->pending_messages_tail, pm); | ||
1157 | #if DEBUG_TCP | 1155 | #if DEBUG_TCP |
1158 | GNUNET_log_from (GNUNET_ERROR_TYPE_DEBUG, "tcp", | 1156 | GNUNET_log_from (GNUNET_ERROR_TYPE_DEBUG, "tcp", |
1159 | "Asked to transmit %u bytes to `%s', added message to list.\n", | 1157 | "Asked to transmit %u bytes to `%s', added message to list.\n", |