aboutsummaryrefslogtreecommitdiff
path: root/src/ats
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2014-06-16 08:26:44 +0000
committerChristian Grothoff <christian@grothoff.org>2014-06-16 08:26:44 +0000
commitc536d61bc0368f1b552232c0c9b7f11ddb75e295 (patch)
tree96936b47869f2700f262d6396e6d57fd4a628d96 /src/ats
parent2935aa4661612e6fa616864426e3d185f6497a15 (diff)
downloadgnunet-c536d61bc0368f1b552232c0c9b7f11ddb75e295.tar.gz
gnunet-c536d61bc0368f1b552232c0c9b7f11ddb75e295.zip
doxygen, make local symbol static
Diffstat (limited to 'src/ats')
-rw-r--r--src/ats/gnunet-service-ats.c27
1 files changed, 21 insertions, 6 deletions
diff --git a/src/ats/gnunet-service-ats.c b/src/ats/gnunet-service-ats.c
index 4d3ac5679..711aa1236 100644
--- a/src/ats/gnunet-service-ats.c
+++ b/src/ats/gnunet-service-ats.c
@@ -39,9 +39,16 @@
39 */ 39 */
40struct GNUNET_STATISTICS_Handle *GSA_stats; 40struct GNUNET_STATISTICS_Handle *GSA_stats;
41 41
42/**
43 * Handle to the ATS server.
44 */
42static struct GNUNET_SERVER_Handle *GSA_server; 45static struct GNUNET_SERVER_Handle *GSA_server;
43 46
44struct GAS_Addresses_Handle *GSA_addresses; 47/**
48 * Handle to the address state.
49 */
50static struct GAS_Addresses_Handle *GSA_addresses;
51
45 52
46/** 53/**
47 * We have received a `struct ClientStartMessage` from a client. Find out which 54 * We have received a `struct ClientStartMessage` from a client. Find out which
@@ -58,7 +65,10 @@ handle_ats_start (void *cls, struct GNUNET_SERVER_Client *client,
58 const struct ClientStartMessage *msg = 65 const struct ClientStartMessage *msg =
59 (const struct ClientStartMessage *) message; 66 (const struct ClientStartMessage *) message;
60 enum StartFlag flag; 67 enum StartFlag flag;
61 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Received `%s' message\n", "ATS_START"); 68
69 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
70 "Received `%s' message\n",
71 "ATS_START");
62 flag = ntohl (msg->start_flag); 72 flag = ntohl (msg->start_flag);
63 switch (flag) 73 switch (flag)
64 { 74 {
@@ -92,7 +102,8 @@ handle_ats_start (void *cls, struct GNUNET_SERVER_Client *client,
92 * @param client handle of the client 102 * @param client handle of the client
93 */ 103 */
94static void 104static void
95client_disconnect_handler (void *cls, struct GNUNET_SERVER_Client *client) 105client_disconnect_handler (void *cls,
106 struct GNUNET_SERVER_Client *client)
96{ 107{
97 if (NULL == client) 108 if (NULL == client)
98 return; 109 return;
@@ -108,13 +119,16 @@ client_disconnect_handler (void *cls, struct GNUNET_SERVER_Client *client)
108 * @param tc unused 119 * @param tc unused
109 */ 120 */
110static void 121static void
111cleanup_task (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) 122cleanup_task (void *cls,
123 const struct GNUNET_SCHEDULER_TaskContext *tc)
112{ 124{
113 GAS_addresses_done (GSA_addresses); 125 GAS_addresses_done (GSA_addresses);
114 GAS_scheduling_done (); 126 GAS_scheduling_done ();
115 GAS_performance_done (); 127 GAS_performance_done ();
116 GAS_reservations_done (); 128 GAS_reservations_done ();
117 GNUNET_SERVER_disconnect_notify_cancel (GSA_server, &client_disconnect_handler, NULL); 129 GNUNET_SERVER_disconnect_notify_cancel (GSA_server,
130 &client_disconnect_handler,
131 NULL);
118 if (NULL != GSA_stats) 132 if (NULL != GSA_stats)
119 { 133 {
120 GNUNET_STATISTICS_destroy (GSA_stats, GNUNET_NO); 134 GNUNET_STATISTICS_destroy (GSA_stats, GNUNET_NO);
@@ -191,7 +205,8 @@ int
191main (int argc, char *const *argv) 205main (int argc, char *const *argv)
192{ 206{
193 return (GNUNET_OK == 207 return (GNUNET_OK ==
194 GNUNET_SERVICE_run (argc, argv, "ats", GNUNET_SERVICE_OPTION_NONE, 208 GNUNET_SERVICE_run (argc, argv, "ats",
209 GNUNET_SERVICE_OPTION_NONE,
195 &run, NULL)) ? 0 : 1; 210 &run, NULL)) ? 0 : 1;
196} 211}
197 212