diff options
author | Matthias Wachs <wachs@net.in.tum.de> | 2014-03-17 13:23:25 +0000 |
---|---|---|
committer | Matthias Wachs <wachs@net.in.tum.de> | 2014-03-17 13:23:25 +0000 |
commit | 1a4b3c56a17360ff25f6af5c09ef5f25b2f5abc3 (patch) | |
tree | 3c4c77952f2b7136f66f5a79c75bc88ded714947 /src/peerinfo | |
parent | df9496caaf3f8edba42bae86c0512a2cedb4ddc0 (diff) |
reformating and adding additional log info about hello import
Diffstat (limited to 'src/peerinfo')
-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 c93072de30..0bbb341849 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, notify_list = GNUNET_SERVER_notification_context_create (server, 0); noio = GNUNET_CONFIGURATION_get_value_yesno (cfg, "peerinfo", "NO_IO"); use_included = GNUNET_CONFIGURATION_get_value_yesno (cfg, "peerinfo", "USE_INCLUDED_HELLOS"); + if (GNUNET_SYSERR == use_included) + use_included = GNUNET_NO; GNUNET_SCHEDULER_add_delayed (GNUNET_TIME_UNIT_FOREVER_REL, &shutdown_task, NULL); if (GNUNET_YES != noio) @@ -1277,22 +1279,22 @@ run (void *cls, struct GNUNET_SERVER_Handle *server, &cron_clean_data_hosts, NULL); if (GNUNET_YES == use_included) { - ip = GNUNET_OS_installation_get_path (GNUNET_OS_IPK_DATADIR); - GNUNET_asprintf (&peerdir, - "%shellos", - ip); - GNUNET_free (ip); - - GNUNET_log (GNUNET_ERROR_TYPE_INFO, - _("Importing HELLOs from `%s'\n"), - peerdir); - dsc.matched = 0; - dsc.remove_files = GNUNET_NO; - - GNUNET_DISK_directory_scan (peerdir, - &hosts_directory_scan_callback, &dsc); - - GNUNET_free (peerdir); + ip = GNUNET_OS_installation_get_path (GNUNET_OS_IPK_DATADIR); + GNUNET_asprintf (&peerdir, "%shellos", ip); + GNUNET_free(ip); + + GNUNET_log(GNUNET_ERROR_TYPE_INFO, _("Importing HELLOs from `%s'\n"), + peerdir); + dsc.matched = 0; + dsc.remove_files = GNUNET_NO; + + GNUNET_DISK_directory_scan (peerdir, &hosts_directory_scan_callback, + &dsc); + GNUNET_free (peerdir); + } + else + { + GNUNET_log(GNUNET_ERROR_TYPE_INFO, _("Skipping import of included HELLOs\n")); } } GNUNET_SERVER_add_handlers (server, handlers); |