diff options
Diffstat (limited to 'src/peerinfo/gnunet-service-peerinfo.c')
-rw-r--r-- | src/peerinfo/gnunet-service-peerinfo.c | 34 |
1 files changed, 18 insertions, 16 deletions
diff --git a/src/peerinfo/gnunet-service-peerinfo.c b/src/peerinfo/gnunet-service-peerinfo.c index c93072de3..0bbb34184 100644 --- a/src/peerinfo/gnunet-service-peerinfo.c +++ b/src/peerinfo/gnunet-service-peerinfo.c | |||
@@ -1255,6 +1255,8 @@ run (void *cls, struct GNUNET_SERVER_Handle *server, | |||
1255 | notify_list = GNUNET_SERVER_notification_context_create (server, 0); | 1255 | notify_list = GNUNET_SERVER_notification_context_create (server, 0); |
1256 | noio = GNUNET_CONFIGURATION_get_value_yesno (cfg, "peerinfo", "NO_IO"); | 1256 | noio = GNUNET_CONFIGURATION_get_value_yesno (cfg, "peerinfo", "NO_IO"); |
1257 | use_included = GNUNET_CONFIGURATION_get_value_yesno (cfg, "peerinfo", "USE_INCLUDED_HELLOS"); | 1257 | use_included = GNUNET_CONFIGURATION_get_value_yesno (cfg, "peerinfo", "USE_INCLUDED_HELLOS"); |
1258 | if (GNUNET_SYSERR == use_included) | ||
1259 | use_included = GNUNET_NO; | ||
1258 | GNUNET_SCHEDULER_add_delayed (GNUNET_TIME_UNIT_FOREVER_REL, &shutdown_task, | 1260 | GNUNET_SCHEDULER_add_delayed (GNUNET_TIME_UNIT_FOREVER_REL, &shutdown_task, |
1259 | NULL); | 1261 | NULL); |
1260 | if (GNUNET_YES != noio) | 1262 | if (GNUNET_YES != noio) |
@@ -1277,22 +1279,22 @@ run (void *cls, struct GNUNET_SERVER_Handle *server, | |||
1277 | &cron_clean_data_hosts, NULL); | 1279 | &cron_clean_data_hosts, NULL); |
1278 | if (GNUNET_YES == use_included) | 1280 | if (GNUNET_YES == use_included) |
1279 | { | 1281 | { |
1280 | ip = GNUNET_OS_installation_get_path (GNUNET_OS_IPK_DATADIR); | 1282 | ip = GNUNET_OS_installation_get_path (GNUNET_OS_IPK_DATADIR); |
1281 | GNUNET_asprintf (&peerdir, | 1283 | GNUNET_asprintf (&peerdir, "%shellos", ip); |
1282 | "%shellos", | 1284 | GNUNET_free(ip); |
1283 | ip); | 1285 | |
1284 | GNUNET_free (ip); | 1286 | GNUNET_log(GNUNET_ERROR_TYPE_INFO, _("Importing HELLOs from `%s'\n"), |
1285 | 1287 | peerdir); | |
1286 | GNUNET_log (GNUNET_ERROR_TYPE_INFO, | 1288 | dsc.matched = 0; |
1287 | _("Importing HELLOs from `%s'\n"), | 1289 | dsc.remove_files = GNUNET_NO; |
1288 | peerdir); | 1290 | |
1289 | dsc.matched = 0; | 1291 | GNUNET_DISK_directory_scan (peerdir, &hosts_directory_scan_callback, |
1290 | dsc.remove_files = GNUNET_NO; | 1292 | &dsc); |
1291 | 1293 | GNUNET_free (peerdir); | |
1292 | GNUNET_DISK_directory_scan (peerdir, | 1294 | } |
1293 | &hosts_directory_scan_callback, &dsc); | 1295 | else |
1294 | 1296 | { | |
1295 | GNUNET_free (peerdir); | 1297 | GNUNET_log(GNUNET_ERROR_TYPE_INFO, _("Skipping import of included HELLOs\n")); |
1296 | } | 1298 | } |
1297 | } | 1299 | } |
1298 | GNUNET_SERVER_add_handlers (server, handlers); | 1300 | GNUNET_SERVER_add_handlers (server, handlers); |