aboutsummaryrefslogtreecommitdiff
path: root/src/hostlist/gnunet-daemon-hostlist.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/hostlist/gnunet-daemon-hostlist.c')
-rw-r--r--src/hostlist/gnunet-daemon-hostlist.c21
1 files changed, 15 insertions, 6 deletions
diff --git a/src/hostlist/gnunet-daemon-hostlist.c b/src/hostlist/gnunet-daemon-hostlist.c
index 62ecc5dfd1..833f24ece0 100644
--- a/src/hostlist/gnunet-daemon-hostlist.c
+++ b/src/hostlist/gnunet-daemon-hostlist.c
@@ -275,16 +275,24 @@ run (void *cls,
return;
}
stats = GNUNET_STATISTICS_create ("hostlist", cfg);
+ if (NULL == stats)
+ {
+ GNUNET_break (0);
+ return;
+ }
if (bootstrapping)
- GNUNET_HOSTLIST_client_start (cfg, stats, &client_ch, &client_dh,
- &client_adv_handler, learning);
+ GNUNET_HOSTLIST_client_start (cfg, stats,
+ &client_ch,
+ &client_dh,
+ &client_adv_handler,
+ learning);
core =
GNUNET_CORE_connect (cfg, NULL,
&core_init,
&connect_handler,
- &disconnect_handler, NULL,
- GNUNET_NO, NULL,
- GNUNET_NO,
+ &disconnect_handler,
+ NULL, GNUNET_NO,
+ NULL, GNUNET_NO,
learning ? learn_handlers : no_learn_handlers);
@@ -346,7 +354,8 @@ main (int argc, char *const *argv)
GNUNET_log_setup ("hostlist", "WARNING", NULL);
ret =
(GNUNET_OK ==
- GNUNET_PROGRAM_run (argc, argv, "hostlist",
+ GNUNET_PROGRAM_run (argc, argv,
+ "hostlist",
_("GNUnet hostlist server and client"),
options,
&run, NULL)) ? 0 : 1;