summaryrefslogtreecommitdiff
path: root/src/template/gnunet-service-template.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/template/gnunet-service-template.c')
-rw-r--r--src/template/gnunet-service-template.c38
1 files changed, 19 insertions, 19 deletions
diff --git a/src/template/gnunet-service-template.c b/src/template/gnunet-service-template.c
index 6db030d16..e04d2f61d 100644
--- a/src/template/gnunet-service-template.c
+++ b/src/template/gnunet-service-template.c
@@ -33,7 +33,7 @@
33 * @param cls unused 33 * @param cls unused
34 */ 34 */
35static void 35static void
36cleanup_task(void *cls) 36cleanup_task (void *cls)
37{ 37{
38 /* FIXME: do clean up here */ 38 /* FIXME: do clean up here */
39} 39}
@@ -48,9 +48,9 @@ cleanup_task(void *cls)
48 * @return @a c 48 * @return @a c
49 */ 49 */
50static void * 50static void *
51client_connect_cb(void *cls, 51client_connect_cb (void *cls,
52 struct GNUNET_SERVICE_Client *c, 52 struct GNUNET_SERVICE_Client *c,
53 struct GNUNET_MQ_Handle *mq) 53 struct GNUNET_MQ_Handle *mq)
54{ 54{
55 return c; 55 return c;
56} 56}
@@ -64,11 +64,11 @@ client_connect_cb(void *cls,
64 * @param internal_cls should be equal to @a c 64 * @param internal_cls should be equal to @a c
65 */ 65 */
66static void 66static void
67client_disconnect_cb(void *cls, 67client_disconnect_cb (void *cls,
68 struct GNUNET_SERVICE_Client *c, 68 struct GNUNET_SERVICE_Client *c,
69 void *internal_cls) 69 void *internal_cls)
70{ 70{
71 GNUNET_assert(c == internal_cls); 71 GNUNET_assert (c == internal_cls);
72} 72}
73 73
74 74
@@ -80,25 +80,25 @@ client_disconnect_cb(void *cls,
80 * @param service the initialized service 80 * @param service the initialized service
81 */ 81 */
82static void 82static void
83run(void *cls, 83run (void *cls,
84 const struct GNUNET_CONFIGURATION_Handle *cfg, 84 const struct GNUNET_CONFIGURATION_Handle *cfg,
85 struct GNUNET_SERVICE_Handle *service) 85 struct GNUNET_SERVICE_Handle *service)
86{ 86{
87 /* FIXME: do setup here */ 87 /* FIXME: do setup here */
88 GNUNET_SCHEDULER_add_shutdown(&cleanup_task, NULL); 88 GNUNET_SCHEDULER_add_shutdown (&cleanup_task, NULL);
89} 89}
90 90
91 91
92/** 92/**
93 * Define "main" method using service macro. 93 * Define "main" method using service macro.
94 */ 94 */
95GNUNET_SERVICE_MAIN("template", 95GNUNET_SERVICE_MAIN ("template",
96 GNUNET_SERVICE_OPTION_NONE, 96 GNUNET_SERVICE_OPTION_NONE,
97 &run, 97 &run,
98 &client_connect_cb, 98 &client_connect_cb,
99 &client_disconnect_cb, 99 &client_disconnect_cb,
100 NULL, 100 NULL,
101 GNUNET_MQ_handler_end()); 101 GNUNET_MQ_handler_end ());
102 102
103 103
104/* end of gnunet-service-template.c */ 104/* end of gnunet-service-template.c */