From 81b92caa24a83620032438df9c5ee3ea51663a02 Mon Sep 17 00:00:00 2001 From: Christian Grothoff Date: Sat, 17 Jan 2015 22:20:18 +0000 Subject: simplify ATS API and plugin API by returning the network type, instead of an ATS_Information struct --- src/transport/plugin_transport_http_server.c | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) (limited to 'src/transport/plugin_transport_http_server.c') diff --git a/src/transport/plugin_transport_http_server.c b/src/transport/plugin_transport_http_server.c index aaa17b2cf..c7c145328 100644 --- a/src/transport/plugin_transport_http_server.c +++ b/src/transport/plugin_transport_http_server.c @@ -1423,23 +1423,25 @@ server_lookup_connection (struct HTTP_Server_Plugin *plugin, conn_info->client_addr, sizeof (struct sockaddr_in)); addr_len = http_common_address_get_size (addr); - ats = plugin->env->get_address_type (plugin->env->cls, - conn_info->client_addr, - sizeof (struct sockaddr_in)); + ats.type = htonl (GNUNET_ATS_NETWORK_TYPE); + ats.value = htonl (plugin->env->get_address_type (plugin->env->cls, + conn_info->client_addr, + sizeof (struct sockaddr_in))); break; case (AF_INET6): addr = http_common_address_from_socket (plugin->protocol, conn_info->client_addr, sizeof (struct sockaddr_in6)); addr_len = http_common_address_get_size (addr); - ats = plugin->env->get_address_type (plugin->env->cls, - conn_info->client_addr, - sizeof (struct sockaddr_in6)); + ats.type = htonl (GNUNET_ATS_NETWORK_TYPE); + ats.value = htonl (plugin->env->get_address_type (plugin->env->cls, + conn_info->client_addr, + sizeof (struct sockaddr_in6))); break; default: - /* external host name */ + /* external host name */ ats.type = htonl (GNUNET_ATS_NETWORK_TYPE); - ats.type = htonl (GNUNET_ATS_NET_WAN); + ats.value = htonl (GNUNET_ATS_NET_WAN); return NULL; } s = GNUNET_new (struct Session); -- cgit v1.2.3