diff options
author | Matthias Wachs <wachs@net.in.tum.de> | 2011-12-14 08:53:29 +0000 |
---|---|---|
committer | Matthias Wachs <wachs@net.in.tum.de> | 2011-12-14 08:53:29 +0000 |
commit | 2a46bac24eaca8ce16d12359e88f4a9d3cf49c28 (patch) | |
tree | 832a1ebc38fd60e512fa69688f94abda5019741b /src/transport/plugin_transport_tcp.c | |
parent | 47bd57c6a129474f51001cf02d15a04340d9b834 (diff) | |
download | gnunet-2a46bac24eaca8ce16d12359e88f4a9d3cf49c28.tar.gz gnunet-2a46bac24eaca8ce16d12359e88f4a9d3cf49c28.zip |
removing ats functions from plugins, instead provide callback function
Diffstat (limited to 'src/transport/plugin_transport_tcp.c')
-rw-r--r-- | src/transport/plugin_transport_tcp.c | 18 |
1 files changed, 6 insertions, 12 deletions
diff --git a/src/transport/plugin_transport_tcp.c b/src/transport/plugin_transport_tcp.c index bfe1dc805..dfd4ccee0 100644 --- a/src/transport/plugin_transport_tcp.c +++ b/src/transport/plugin_transport_tcp.c | |||
@@ -1126,11 +1126,10 @@ tcp_plugin_send (void *cls, const struct GNUNET_PeerIdentity *target, | |||
1126 | session->connect_addr = GNUNET_malloc (addrlen); | 1126 | session->connect_addr = GNUNET_malloc (addrlen); |
1127 | memcpy (session->connect_addr, addr, addrlen); | 1127 | memcpy (session->connect_addr, addr, addrlen); |
1128 | session->connect_alen = addrlen; | 1128 | session->connect_alen = addrlen; |
1129 | if ((addrlen != 0) && (plugin->env->ats != NULL)) | 1129 | if (addrlen != 0) |
1130 | { | 1130 | { |
1131 | struct GNUNET_ATS_Information ats; | 1131 | struct GNUNET_ATS_Information ats; |
1132 | GNUNET_assert(plugin->env->ats != NULL); | 1132 | ats = plugin->env->get_address_type (plugin->env->cls, sb ,sbs); |
1133 | ats = GNUNET_ATS_address_get_type(plugin->env->ats, sb ,sbs); | ||
1134 | session->ats_address_network_type = ats.value; | 1133 | session->ats_address_network_type = ats.value; |
1135 | } | 1134 | } |
1136 | else | 1135 | else |
@@ -1638,15 +1637,10 @@ handle_tcp_welcome (void *cls, struct GNUNET_SERVER_Client *client, | |||
1638 | session->connect_alen = sizeof (struct IPv6TcpAddress); | 1637 | session->connect_alen = sizeof (struct IPv6TcpAddress); |
1639 | } | 1638 | } |
1640 | 1639 | ||
1641 | if (plugin->env->ats != NULL) | 1640 | struct GNUNET_ATS_Information ats; |
1642 | { | 1641 | ats = plugin->env->get_address_type (plugin->env->cls, vaddr ,alen); |
1643 | struct GNUNET_ATS_Information ats; | 1642 | session->ats_address_network_type = ats.value; |
1644 | GNUNET_assert(plugin->env->ats != NULL); | 1643 | |
1645 | ats = GNUNET_ATS_address_get_type(plugin->env->ats, vaddr ,alen); | ||
1646 | session->ats_address_network_type = ats.value; | ||
1647 | } | ||
1648 | else | ||
1649 | GNUNET_break (0); | ||
1650 | GNUNET_free (vaddr); | 1644 | GNUNET_free (vaddr); |
1651 | } | 1645 | } |
1652 | else | 1646 | else |