aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorMatthias Wachs <wachs@net.in.tum.de>2014-03-17 13:23:25 +0000
committerMatthias Wachs <wachs@net.in.tum.de>2014-03-17 13:23:25 +0000
commit1a4b3c56a17360ff25f6af5c09ef5f25b2f5abc3 (patch)
tree3c4c77952f2b7136f66f5a79c75bc88ded714947 /src
parentdf9496caaf3f8edba42bae86c0512a2cedb4ddc0 (diff)
downloadgnunet-1a4b3c56a17360ff25f6af5c09ef5f25b2f5abc3.tar.gz
gnunet-1a4b3c56a17360ff25f6af5c09ef5f25b2f5abc3.zip
reformating and adding additional log info about hello import
Diffstat (limited to 'src')
-rw-r--r--src/peerinfo/gnunet-service-peerinfo.c34
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);