aboutsummaryrefslogtreecommitdiff
path: root/src/ats/gnunet-service-ats.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/ats/gnunet-service-ats.c')
-rw-r--r--src/ats/gnunet-service-ats.c15
1 files changed, 11 insertions, 4 deletions
diff --git a/src/ats/gnunet-service-ats.c b/src/ats/gnunet-service-ats.c
index aef72f1..3218769 100644
--- a/src/ats/gnunet-service-ats.c
+++ b/src/ats/gnunet-service-ats.c
@@ -41,6 +41,7 @@ struct GNUNET_STATISTICS_Handle *GSA_stats;
static struct GNUNET_SERVER_Handle *GSA_server;
+struct GAS_Addresses_Handle *GSA_addresses;
/**
* We have received a 'ClientStartMessage' from a client. Find out which
@@ -109,7 +110,7 @@ client_disconnect_handler (void *cls, struct GNUNET_SERVER_Client *client)
static void
cleanup_task (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc)
{
- GAS_addresses_done ();
+ GAS_addresses_done (GSA_addresses);
GAS_scheduling_done ();
GAS_performance_done ();
GAS_reservations_done ();
@@ -142,6 +143,11 @@ run (void *cls, struct GNUNET_SERVER_Handle *server,
{&GAS_handle_request_address_cancel, NULL,
GNUNET_MESSAGE_TYPE_ATS_REQUEST_ADDRESS_CANCEL,
sizeof (struct RequestAddressMessage)},
+ {&GAS_handle_request_address_list, NULL,
+ GNUNET_MESSAGE_TYPE_ATS_ADDRESSLIST_REQUEST,
+ sizeof (struct AddressListRequestMessage)},
+ {&GAS_handle_address_add, NULL,
+ GNUNET_MESSAGE_TYPE_ATS_ADDRESS_ADD, 0},
{&GAS_handle_address_update, NULL,
GNUNET_MESSAGE_TYPE_ATS_ADDRESS_UPDATE, 0},
{&GAS_handle_address_in_use, NULL,
@@ -161,9 +167,10 @@ run (void *cls, struct GNUNET_SERVER_Handle *server,
GSA_server = server;
GSA_stats = GNUNET_STATISTICS_create ("ats", cfg);
GAS_reservations_init ();
- GAS_performance_init (server);
- GAS_scheduling_init (server);
- GAS_addresses_init (cfg, GSA_stats);
+ GSA_addresses = GAS_addresses_init (cfg, GSA_stats);
+ GAS_performance_init (server, GSA_addresses);
+ GAS_scheduling_init (server, GSA_addresses);
+
GNUNET_SERVER_disconnect_notify (server, &client_disconnect_handler, NULL);
GNUNET_SERVER_add_handlers (server, handlers);
GNUNET_SCHEDULER_add_delayed (GNUNET_TIME_UNIT_FOREVER_REL, &cleanup_task,