From: Christian Grothoff Date: Sat, 13 Aug 2011 10:40:10 +0000 (+0000) Subject: cost report is not used X-Git-Tag: initial-import-from-subversion-38251~17366 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=e7d1ebe3e0950968c4fe4899af2510f044f04c9f;p=oweals%2Fgnunet.git cost report is not used --- diff --git a/src/include/gnunet_transport_plugin.h b/src/include/gnunet_transport_plugin.h index fdd298e7f..b47843188 100644 --- a/src/include/gnunet_transport_plugin.h +++ b/src/include/gnunet_transport_plugin.h @@ -158,26 +158,6 @@ typedef struct GNUNET_TIME_Relative (*GNUNET_TRANSPORT_TrafficReport) (void *cls size_t amount_recved); -/** - * Function called whenever the plugin has to notify ATS about costs for using this transport - * - * The cost will be passed as struct GNUNET_TRANSPORT_ATS_Cost_Information[] - * This array is 0-terminated, so the last element will be a pair: - * ((cost->cost_type==GNUNET_TRANSPORT_ATS_ARRAY_TERMINATOR) && cost->cost_value==0)) - * - * @param cls closure - * @param peer peer - * @param addr peer address - * @param addrlen address length - * @param cost pointer to the first element of struct GNUNET_TRANSPORT_ATS_Cost_Information[] - */ -typedef void (*GNUNET_TRANSPORT_CostReport) (void *cls, - const struct GNUNET_PeerIdentity *peer, - const void *addr, - uint16_t addrlen, - struct GNUNET_TRANSPORT_ATS_Information * cost); - - /** * Function that returns a HELLO message. */ @@ -236,11 +216,6 @@ struct GNUNET_TRANSPORT_PluginEnvironment */ GNUNET_TRANSPORT_SessionEnd session_end; - /** - * Inform service about costs for using this transport plugin - */ - GNUNET_TRANSPORT_CostReport cost_report; - /** * What is the maximum number of connections that this transport * should allow? Transports that do not have sessions (such as diff --git a/src/transport/gnunet-service-transport-new.c b/src/transport/gnunet-service-transport-new.c index 7b9ffe2ee..eff799d03 100644 --- a/src/transport/gnunet-service-transport-new.c +++ b/src/transport/gnunet-service-transport-new.c @@ -182,29 +182,6 @@ plugin_env_session_end (void *cls, } -/** - * Function called whenever the plugin has to notify ATS about costs for using this transport - * - * The cost will be passed as struct GNUNET_TRANSPORT_ATS_Cost_Information[] - * This array is 0-terminated, so the last element will be a pair: - * ((cost->cost_type==GNUNET_TRANSPORT_ATS_ARRAY_TERMINATOR) && cost->cost_value==0)) - * - * @param cls closure - * @param peer peer - * @param addr peer address - * @param addrlen address length - * @param cost pointer to the first element of struct GNUNET_TRANSPORT_ATS_Cost_Information[] - */ -static void -plugin_env_cost_notification (void *cls, - const struct GNUNET_PeerIdentity *peer, - const void *addr, - uint16_t addrlen, - struct GNUNET_TRANSPORT_ATS_Information * cost) -{ -} - - /** * Function called when the service shuts down. Unloads our plugins * and cancels pending validations. @@ -303,8 +280,7 @@ run (void *cls, GST_blacklist_start (server); GST_plugins_load (&plugin_env_receive_callback, &plugin_env_address_change_notification, - &plugin_env_session_end, - &plugin_env_cost_notification); + &plugin_env_session_end); GST_ats = GNUNET_ATS_init (GST_cfg, NULL, // FIXME... NULL); // FIXME... diff --git a/src/transport/gnunet-service-transport_plugins.c b/src/transport/gnunet-service-transport_plugins.c index bacafa5f3..7fcc6f80d 100644 --- a/src/transport/gnunet-service-transport_plugins.c +++ b/src/transport/gnunet-service-transport_plugins.c @@ -89,13 +89,11 @@ static struct TransportPlugin *plugins_tail; * @param address_cb function to call when our public addresses changed * @param traffic_cb function to call for flow control * @param session_end_cb function to call when a session was terminated - * @param cost_cb function to call about ATS cost changes */ void GST_plugins_load (GNUNET_TRANSPORT_PluginReceiveCallback recv_cb, GNUNET_TRANSPORT_AddressNotification address_cb, - GNUNET_TRANSPORT_SessionEnd session_end_cb, - GNUNET_TRANSPORT_CostReport cost_cb) + GNUNET_TRANSPORT_SessionEnd session_end_cb) { struct TransportPlugin *plug; unsigned long long tneigh; diff --git a/src/transport/gnunet-service-transport_plugins.h b/src/transport/gnunet-service-transport_plugins.h index ee93918c7..2852ab4bb 100644 --- a/src/transport/gnunet-service-transport_plugins.h +++ b/src/transport/gnunet-service-transport_plugins.h @@ -40,15 +40,12 @@ * * @param recv_cb function to call when data is received * @param address_cb function to call when our public addresses changed - * @param traffic_cb function to call for flow control * @param session_end_cb function to call when a session was terminated - * @param cost_cb function to call about ATS cost changes */ void GST_plugins_load (GNUNET_TRANSPORT_PluginReceiveCallback recv_cb, GNUNET_TRANSPORT_AddressNotification address_cb, - GNUNET_TRANSPORT_SessionEnd session_end_cb, - GNUNET_TRANSPORT_CostReport cost_cb); + GNUNET_TRANSPORT_SessionEnd session_end_cb); /**