aboutsummaryrefslogtreecommitdiff
path: root/src/transport/plugin_transport_http_client.c
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2015-10-07 14:15:38 +0000
committerChristian Grothoff <christian@grothoff.org>2015-10-07 14:15:38 +0000
commite5bd8fb4aa72717b8707a4652f14c0735acb52c4 (patch)
tree08398e22b9408cc24b6b9e6cb360fe04b9eeae05 /src/transport/plugin_transport_http_client.c
parent572bab1ace57fb9d7acbd218d6940cb1e9a0797b (diff)
downloadgnunet-e5bd8fb4aa72717b8707a4652f14c0735acb52c4.tar.gz
gnunet-e5bd8fb4aa72717b8707a4652f14c0735acb52c4.zip
determine network scope for ATS even if we do not yet have a session and only have an address
Diffstat (limited to 'src/transport/plugin_transport_http_client.c')
-rw-r--r--src/transport/plugin_transport_http_client.c19
1 files changed, 19 insertions, 0 deletions
diff --git a/src/transport/plugin_transport_http_client.c b/src/transport/plugin_transport_http_client.c
index de9ad541b..8066fb384 100644
--- a/src/transport/plugin_transport_http_client.c
+++ b/src/transport/plugin_transport_http_client.c
@@ -1942,6 +1942,24 @@ http_client_plugin_get_network (void *cls,
1942 1942
1943 1943
1944/** 1944/**
1945 * Function obtain the network type for an address.
1946 *
1947 * @param cls closure (`struct Plugin *`)
1948 * @param address the address
1949 * @return the network type
1950 */
1951static enum GNUNET_ATS_Network_Type
1952http_client_plugin_get_network_for_address (void *cls,
1953 const struct GNUNET_HELLO_Address *address)
1954{
1955 struct HTTP_Client_Plugin *plugin = cls;
1956
1957 return http_common_get_network_for_address (plugin->env,
1958 address);
1959}
1960
1961
1962/**
1945 * Session was idle, so disconnect it 1963 * Session was idle, so disconnect it
1946 * 1964 *
1947 * @param cls the `struct Session` of the idle session 1965 * @param cls the `struct Session` of the idle session
@@ -2469,6 +2487,7 @@ LIBGNUNET_PLUGIN_TRANSPORT_INIT (void *cls)
2469 api->string_to_address = &http_common_plugin_string_to_address; 2487 api->string_to_address = &http_common_plugin_string_to_address;
2470 api->address_pretty_printer = &http_common_plugin_address_pretty_printer; 2488 api->address_pretty_printer = &http_common_plugin_address_pretty_printer;
2471 api->get_network = &http_client_plugin_get_network; 2489 api->get_network = &http_client_plugin_get_network;
2490 api->get_network_for_address = &http_client_plugin_get_network_for_address;
2472 api->update_session_timeout = &http_client_plugin_update_session_timeout; 2491 api->update_session_timeout = &http_client_plugin_update_session_timeout;
2473 api->update_inbound_delay = &http_client_plugin_update_inbound_delay; 2492 api->update_inbound_delay = &http_client_plugin_update_inbound_delay;
2474 api->setup_monitor = &http_client_plugin_setup_monitor; 2493 api->setup_monitor = &http_client_plugin_setup_monitor;