diff options
Diffstat (limited to 'src/ext/gnunet-service-ext.c')
-rw-r--r-- | src/ext/gnunet-service-ext.c | 39 |
1 files changed, 19 insertions, 20 deletions
diff --git a/src/ext/gnunet-service-ext.c b/src/ext/gnunet-service-ext.c index d434182..6399389 100644 --- a/src/ext/gnunet-service-ext.c +++ b/src/ext/gnunet-service-ext.c | |||
@@ -24,7 +24,6 @@ | |||
24 | * @author Christian Grothoff | 24 | * @author Christian Grothoff |
25 | */ | 25 | */ |
26 | #include <gnunet/platform.h> | 26 | #include <gnunet/platform.h> |
27 | #include "gnunet_ext_config.h" | ||
28 | #include <stddef.h> | 27 | #include <stddef.h> |
29 | 28 | ||
30 | #if HAVE_NETINET_IN_H | 29 | #if HAVE_NETINET_IN_H |
@@ -64,8 +63,7 @@ static const struct GNUNET_CONFIGURATION_Handle *cfg; | |||
64 | /** | 63 | /** |
65 | * This structure holds informations about the project. | 64 | * This structure holds informations about the project. |
66 | */ | 65 | */ |
67 | static const struct GNUNET_OS_ProjectData gnunetext_pd = | 66 | static const struct GNUNET_OS_ProjectData gnunetext_pd = { |
68 | { | ||
69 | .libname = "libgnunetext", | 67 | .libname = "libgnunetext", |
70 | .project_dirname = "gnunet-ext", | 68 | .project_dirname = "gnunet-ext", |
71 | .binary_name = "gnunet-service-ext", | 69 | .binary_name = "gnunet-service-ext", |
@@ -95,6 +93,7 @@ project_data_initialize (void) | |||
95 | GNUNET_OS_init (&gnunetext_pd); | 93 | GNUNET_OS_init (&gnunetext_pd); |
96 | } | 94 | } |
97 | 95 | ||
96 | |||
98 | /** | 97 | /** |
99 | * Handle EXT-message. | 98 | * Handle EXT-message. |
100 | * | 99 | * |
@@ -141,8 +140,8 @@ shutdown_task (void *cls) | |||
141 | */ | 140 | */ |
142 | static void | 141 | static void |
143 | run (void *cls, | 142 | run (void *cls, |
144 | struct GNUNET_SERVER_Handle *server, | 143 | const struct GNUNET_CONFIGURATION_Handle *c, |
145 | const struct GNUNET_CONFIGURATION_Handle *c) | 144 | struct GNUNET_SERVICE_Handle *service) |
146 | { | 145 | { |
147 | cfg = c; | 146 | cfg = c; |
148 | GNUNET_SCHEDULER_add_shutdown (&shutdown_task, | 147 | GNUNET_SCHEDULER_add_shutdown (&shutdown_task, |
@@ -160,8 +159,8 @@ run (void *cls, | |||
160 | */ | 159 | */ |
161 | static void * | 160 | static void * |
162 | client_connect_cb (void *cls, | 161 | client_connect_cb (void *cls, |
163 | struct GNUNET_SERVICE_Client *c, | 162 | struct GNUNET_SERVICE_Client *c, |
164 | struct GNUNET_MQ_Handle *mq) | 163 | struct GNUNET_MQ_Handle *mq) |
165 | { | 164 | { |
166 | struct ClientContext *cc; | 165 | struct ClientContext *cc; |
167 | 166 | ||
@@ -182,8 +181,8 @@ client_connect_cb (void *cls, | |||
182 | */ | 181 | */ |
183 | static void | 182 | static void |
184 | client_disconnect_cb (void *cls, | 183 | client_disconnect_cb (void *cls, |
185 | struct GNUNET_SERVICE_Client *c, | 184 | struct GNUNET_SERVICE_Client *c, |
186 | void *internal_cls) | 185 | void *internal_cls) |
187 | { | 186 | { |
188 | struct ClientContext *cc = internal_cls; | 187 | struct ClientContext *cc = internal_cls; |
189 | 188 | ||
@@ -197,16 +196,16 @@ client_disconnect_cb (void *cls, | |||
197 | * Define "main" method using service macro. | 196 | * Define "main" method using service macro. |
198 | */ | 197 | */ |
199 | GNUNET_SERVICE_MAIN | 198 | GNUNET_SERVICE_MAIN |
200 | ("ext", | 199 | ("ext", |
201 | GNUNET_SERVICE_OPTION_NONE, | 200 | GNUNET_SERVICE_OPTION_NONE, |
202 | &run, | 201 | &run, |
203 | &client_connect_cb, | 202 | &client_connect_cb, |
204 | &client_disconnect_cb, | 203 | &client_disconnect_cb, |
205 | NULL, | 204 | NULL, |
206 | GNUNET_MQ_hd_fixed_size (ext, | 205 | GNUNET_MQ_hd_fixed_size (ext, |
207 | GNUNET_MESSAGE_TYPE_EXT, | 206 | GNUNET_MESSAGE_TYPE_EXT, |
208 | struct GNUNET_MessageHeader, | 207 | struct GNUNET_MessageHeader, |
209 | NULL), | 208 | NULL), |
210 | GNUNET_MQ_handler_end ()); | 209 | GNUNET_MQ_handler_end ()); |
211 | 210 | ||
212 | /* end of gnunet-service-ext.c */ | 211 | /* end of gnunet-service-ext.c */ |