*/
#include "platform.h"
#include "gnunet_util_lib.h"
-#include "gnunet_ats_service.h"
#include "gnunet-service-ats.h"
#include "gnunet-service-ats_addresses.h"
#include "gnunet-service-ats_performance.h"
*/
struct GNUNET_STATISTICS_Handle *GSA_stats;
+/**
+ * Handle to the ATS server.
+ */
static struct GNUNET_SERVER_Handle *GSA_server;
-struct GAS_Addresses_Handle *GSA_addresses;
+/**
+ * Handle to the address state.
+ */
+static struct GAS_Addresses_Handle *GSA_addresses;
+
/**
* We have received a `struct ClientStartMessage` from a client. Find out which
const struct ClientStartMessage *msg =
(const struct ClientStartMessage *) message;
enum StartFlag flag;
- GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Received `%s' message\n", "ATS_START");
+
+ GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
+ "Received `%s' message\n",
+ "ATS_START");
flag = ntohl (msg->start_flag);
switch (flag)
{
* @param client handle of the client
*/
static void
-client_disconnect_handler (void *cls, struct GNUNET_SERVER_Client *client)
+client_disconnect_handler (void *cls,
+ struct GNUNET_SERVER_Client *client)
{
if (NULL == client)
return;
* @param tc unused
*/
static void
-cleanup_task (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc)
+cleanup_task (void *cls,
+ const struct GNUNET_SCHEDULER_TaskContext *tc)
{
GAS_addresses_done (GSA_addresses);
GAS_scheduling_done ();
GAS_performance_done ();
GAS_reservations_done ();
- GNUNET_SERVER_disconnect_notify_cancel (GSA_server, &client_disconnect_handler, NULL);
+ GNUNET_SERVER_disconnect_notify_cancel (GSA_server,
+ &client_disconnect_handler,
+ NULL);
if (NULL != GSA_stats)
{
GNUNET_STATISTICS_destroy (GSA_stats, GNUNET_NO);
main (int argc, char *const *argv)
{
return (GNUNET_OK ==
- GNUNET_SERVICE_run (argc, argv, "ats", GNUNET_SERVICE_OPTION_NONE,
+ GNUNET_SERVICE_run (argc, argv, "ats",
+ GNUNET_SERVICE_OPTION_NONE,
&run, NULL)) ? 0 : 1;
}