diff options
author | Matthias Wachs <wachs@net.in.tum.de> | 2011-10-13 13:06:01 +0000 |
---|---|---|
committer | Matthias Wachs <wachs@net.in.tum.de> | 2011-10-13 13:06:01 +0000 |
commit | f40b9f4d92412da3a1461f16069c8bbb425bd136 (patch) | |
tree | a1f9df4553aace1af037e465fe39b0f00a05c116 /src/transport/plugin_transport_tcp.c | |
parent | 86ad1393cdf6c8b37437c330fce25ebfffbc8ffd (diff) | |
download | gnunet-f40b9f4d92412da3a1461f16069c8bbb425bd136.tar.gz gnunet-f40b9f4d92412da3a1461f16069c8bbb425bd136.zip |
compile
Diffstat (limited to 'src/transport/plugin_transport_tcp.c')
-rw-r--r-- | src/transport/plugin_transport_tcp.c | 15 |
1 files changed, 5 insertions, 10 deletions
diff --git a/src/transport/plugin_transport_tcp.c b/src/transport/plugin_transport_tcp.c index 20e4bda50..d85d5fc82 100644 --- a/src/transport/plugin_transport_tcp.c +++ b/src/transport/plugin_transport_tcp.c | |||
@@ -1663,13 +1663,10 @@ delayed_done (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | |||
1663 | struct GNUNET_TIME_Relative delay; | 1663 | struct GNUNET_TIME_Relative delay; |
1664 | struct GNUNET_TRANSPORT_ATS_Information ats; | 1664 | struct GNUNET_TRANSPORT_ATS_Information ats; |
1665 | 1665 | ||
1666 | ats.type = htonl (GNUNET_TRANSPORT_ATS_ARRAY_TERMINATOR); | ||
1667 | ats.value = htonl (0); | ||
1668 | |||
1669 | session->receive_delay_task = GNUNET_SCHEDULER_NO_TASK; | 1666 | session->receive_delay_task = GNUNET_SCHEDULER_NO_TASK; |
1670 | delay = | 1667 | delay = |
1671 | session->plugin->env->receive (session->plugin->env->cls, | 1668 | session->plugin->env->receive (session->plugin->env->cls, |
1672 | &session->target, NULL, &ats, 1, session, | 1669 | &session->target, NULL, &ats, 0, session, |
1673 | NULL, 0); | 1670 | NULL, 0); |
1674 | if (delay.rel_value == 0) | 1671 | if (delay.rel_value == 0) |
1675 | GNUNET_SERVER_receive_done (session->client, GNUNET_OK); | 1672 | GNUNET_SERVER_receive_done (session->client, GNUNET_OK); |
@@ -1721,16 +1718,14 @@ handle_tcp_data (void *cls, struct GNUNET_SERVER_Client *client, | |||
1721 | GNUNET_STATISTICS_update (plugin->env->stats, | 1718 | GNUNET_STATISTICS_update (plugin->env->stats, |
1722 | gettext_noop ("# bytes received via TCP"), | 1719 | gettext_noop ("# bytes received via TCP"), |
1723 | ntohs (message->size), GNUNET_NO); | 1720 | ntohs (message->size), GNUNET_NO); |
1724 | struct GNUNET_TRANSPORT_ATS_Information distance[2]; | 1721 | struct GNUNET_TRANSPORT_ATS_Information distance; |
1725 | 1722 | ||
1726 | distance[0].type = htonl (GNUNET_TRANSPORT_ATS_QUALITY_NET_DISTANCE); | 1723 | distance.type = htonl (GNUNET_TRANSPORT_ATS_QUALITY_NET_DISTANCE); |
1727 | distance[0].value = htonl (1); | 1724 | distance.value = htonl (1); |
1728 | distance[1].type = htonl (GNUNET_TRANSPORT_ATS_ARRAY_TERMINATOR); | ||
1729 | distance[1].value = htonl (0); | ||
1730 | delay = | 1725 | delay = |
1731 | plugin->env->receive (plugin->env->cls, &session->target, message, | 1726 | plugin->env->receive (plugin->env->cls, &session->target, message, |
1732 | (const struct GNUNET_TRANSPORT_ATS_Information *) | 1727 | (const struct GNUNET_TRANSPORT_ATS_Information *) |
1733 | &distance, 2, session, | 1728 | &distance, 1, session, |
1734 | (GNUNET_YES == | 1729 | (GNUNET_YES == |
1735 | session->inbound) ? NULL : session->connect_addr, | 1730 | session->inbound) ? NULL : session->connect_addr, |
1736 | (GNUNET_YES == | 1731 | (GNUNET_YES == |