summaryrefslogtreecommitdiff
path: root/src/transport/plugin_transport_http_server.c
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2015-01-17 22:20:18 +0000
committerChristian Grothoff <christian@grothoff.org>2015-01-17 22:20:18 +0000
commit81b92caa24a83620032438df9c5ee3ea51663a02 (patch)
tree2b2df659c94e1ead5bbdb5082e50018c39e68796 /src/transport/plugin_transport_http_server.c
parent4756cb0779daf3e4c33b6e876dce956de7ee6dd8 (diff)
simplify ATS API and plugin API by returning the network type, instead of an ATS_Information struct
Diffstat (limited to 'src/transport/plugin_transport_http_server.c')
-rw-r--r--src/transport/plugin_transport_http_server.c18
1 files changed, 10 insertions, 8 deletions
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);