diff options
author | Martin Schanzenbach <mschanzenbach@posteo.de> | 2020-05-17 20:02:57 +0200 |
---|---|---|
committer | Martin Schanzenbach <mschanzenbach@posteo.de> | 2020-05-17 20:02:57 +0200 |
commit | d89a4c1ee6f00924233c799e50777ea985d5b213 (patch) | |
tree | 215610256687d848ab5c0661360763143d6c193f /src/hostlist/gnunet-daemon-hostlist.c | |
parent | 3362a671f77099f9f53cb998a45eec073576391a (diff) | |
download | gnunet-d89a4c1ee6f00924233c799e50777ea985d5b213.tar.gz gnunet-d89a4c1ee6f00924233c799e50777ea985d5b213.zip |
deps are now required, no need for defines
Diffstat (limited to 'src/hostlist/gnunet-daemon-hostlist.c')
-rw-r--r-- | src/hostlist/gnunet-daemon-hostlist.c | 16 |
1 files changed, 0 insertions, 16 deletions
diff --git a/src/hostlist/gnunet-daemon-hostlist.c b/src/hostlist/gnunet-daemon-hostlist.c index 704c796b4..54e070f89 100644 --- a/src/hostlist/gnunet-daemon-hostlist.c +++ b/src/hostlist/gnunet-daemon-hostlist.c | |||
@@ -30,8 +30,6 @@ | |||
30 | #include "gnunet_protocols.h" | 30 | #include "gnunet_protocols.h" |
31 | #include "gnunet_statistics_service.h" | 31 | #include "gnunet_statistics_service.h" |
32 | 32 | ||
33 | #if HAVE_MHD | ||
34 | |||
35 | #include "gnunet-daemon-hostlist_server.h" | 33 | #include "gnunet-daemon-hostlist_server.h" |
36 | 34 | ||
37 | /** | 35 | /** |
@@ -49,8 +47,6 @@ static int provide_hostlist; | |||
49 | */ | 47 | */ |
50 | static GNUNET_CORE_ConnectEventHandler server_ch; | 48 | static GNUNET_CORE_ConnectEventHandler server_ch; |
51 | 49 | ||
52 | #endif | ||
53 | |||
54 | /** | 50 | /** |
55 | * Set if we are allowed to learn about peers by accessing | 51 | * Set if we are allowed to learn about peers by accessing |
56 | * hostlist servers. | 52 | * hostlist servers. |
@@ -211,13 +207,11 @@ connect_handler (void *cls, | |||
211 | (*client_ch)(cls, | 207 | (*client_ch)(cls, |
212 | peer, | 208 | peer, |
213 | mq)); | 209 | mq)); |
214 | #if HAVE_MHD | ||
215 | if (NULL != server_ch) | 210 | if (NULL != server_ch) |
216 | GNUNET_assert (NULL == | 211 | GNUNET_assert (NULL == |
217 | (*server_ch)(cls, | 212 | (*server_ch)(cls, |
218 | peer, | 213 | peer, |
219 | mq)); | 214 | mq)); |
220 | #endif | ||
221 | return (void *) peer; | 215 | return (void *) peer; |
222 | } | 216 | } |
223 | 217 | ||
@@ -265,12 +259,10 @@ cleaning_task (void *cls) | |||
265 | { | 259 | { |
266 | GNUNET_HOSTLIST_client_stop (); | 260 | GNUNET_HOSTLIST_client_stop (); |
267 | } | 261 | } |
268 | #if HAVE_MHD | ||
269 | if (provide_hostlist) | 262 | if (provide_hostlist) |
270 | { | 263 | { |
271 | GNUNET_HOSTLIST_server_stop (); | 264 | GNUNET_HOSTLIST_server_stop (); |
272 | } | 265 | } |
273 | #endif | ||
274 | if (NULL != stats) | 266 | if (NULL != stats) |
275 | { | 267 | { |
276 | GNUNET_STATISTICS_destroy (stats, | 268 | GNUNET_STATISTICS_destroy (stats, |
@@ -306,9 +298,7 @@ run (void *cls, | |||
306 | }; | 298 | }; |
307 | 299 | ||
308 | if ((! bootstrapping) && (! learning) | 300 | if ((! bootstrapping) && (! learning) |
309 | #if HAVE_MHD | ||
310 | && (! provide_hostlist) | 301 | && (! provide_hostlist) |
311 | #endif | ||
312 | ) | 302 | ) |
313 | { | 303 | { |
314 | GNUNET_log (GNUNET_ERROR_TYPE_WARNING, | 304 | GNUNET_log (GNUNET_ERROR_TYPE_WARNING, |
@@ -338,14 +328,12 @@ run (void *cls, | |||
338 | learning ? learn_handlers : no_learn_handlers); | 328 | learning ? learn_handlers : no_learn_handlers); |
339 | 329 | ||
340 | 330 | ||
341 | #if HAVE_MHD | ||
342 | if (provide_hostlist) | 331 | if (provide_hostlist) |
343 | GNUNET_HOSTLIST_server_start (cfg, | 332 | GNUNET_HOSTLIST_server_start (cfg, |
344 | stats, | 333 | stats, |
345 | core, | 334 | core, |
346 | &server_ch, | 335 | &server_ch, |
347 | advertising); | 336 | advertising); |
348 | #endif | ||
349 | GNUNET_SCHEDULER_add_shutdown (&cleaning_task, | 337 | GNUNET_SCHEDULER_add_shutdown (&cleaning_task, |
350 | NULL); | 338 | NULL); |
351 | 339 | ||
@@ -370,13 +358,11 @@ int | |||
370 | main (int argc, char *const *argv) | 358 | main (int argc, char *const *argv) |
371 | { | 359 | { |
372 | struct GNUNET_GETOPT_CommandLineOption options[] = { | 360 | struct GNUNET_GETOPT_CommandLineOption options[] = { |
373 | #if HAVE_MHD | ||
374 | GNUNET_GETOPT_option_flag ('a', | 361 | GNUNET_GETOPT_option_flag ('a', |
375 | "advertise", | 362 | "advertise", |
376 | gettext_noop ( | 363 | gettext_noop ( |
377 | "advertise our hostlist to other peers"), | 364 | "advertise our hostlist to other peers"), |
378 | &advertising), | 365 | &advertising), |
379 | #endif | ||
380 | GNUNET_GETOPT_option_flag ('b', | 366 | GNUNET_GETOPT_option_flag ('b', |
381 | "bootstrap", | 367 | "bootstrap", |
382 | gettext_noop ( | 368 | gettext_noop ( |
@@ -387,12 +373,10 @@ main (int argc, char *const *argv) | |||
387 | gettext_noop ( | 373 | gettext_noop ( |
388 | "enable learning about hostlist servers from other peers"), | 374 | "enable learning about hostlist servers from other peers"), |
389 | &learning), | 375 | &learning), |
390 | #if HAVE_MHD | ||
391 | GNUNET_GETOPT_option_flag ('p', | 376 | GNUNET_GETOPT_option_flag ('p', |
392 | "provide-hostlist", | 377 | "provide-hostlist", |
393 | gettext_noop ("provide a hostlist server"), | 378 | gettext_noop ("provide a hostlist server"), |
394 | &provide_hostlist), | 379 | &provide_hostlist), |
395 | #endif | ||
396 | GNUNET_GETOPT_OPTION_END | 380 | GNUNET_GETOPT_OPTION_END |
397 | }; | 381 | }; |
398 | 382 | ||