*/
struct GNUNET_STATISTICS_Handle *GSA_stats;
+static struct GNUNET_SERVER_Handle *GSA_server;
+
+
/**
* We have received a 'ClientStartMessage' from a client. Find out which
* type of client it is and notify the respective subsystem.
const struct ClientStartMessage *msg =
(const struct ClientStartMessage *) message;
enum StartFlag flag;
-
GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Received `%s' message\n", "ATS_START");
flag = ntohl (msg->start_flag);
switch (flag)
GAS_scheduling_done ();
GAS_performance_done ();
GAS_reservations_done ();
+ GNUNET_SERVER_disconnect_notify_cancel (GSA_server, &client_disconnect_handler, NULL);
if (NULL != GSA_stats)
{
GNUNET_STATISTICS_destroy (GSA_stats, GNUNET_NO);
{&GAS_handle_request_address_cancel, NULL,
GNUNET_MESSAGE_TYPE_ATS_REQUEST_ADDRESS_CANCEL,
sizeof (struct RequestAddressMessage)},
+ {&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,
sizeof (struct ReservationRequestMessage)},
{&GAS_handle_preference_change, NULL,
GNUNET_MESSAGE_TYPE_ATS_PREFERENCE_CHANGE, 0},
+ {&GAS_handle_reset_backoff, NULL,
+ GNUNET_MESSAGE_TYPE_ATS_RESET_BACKOFF,
+ sizeof (struct ResetBackoffMessage)},
{NULL, NULL, 0, 0}
};
+ GSA_server = server;
GSA_stats = GNUNET_STATISTICS_create ("ats", cfg);
GAS_reservations_init ();
GAS_performance_init (server);