aboutsummaryrefslogtreecommitdiff
path: root/src/peerinfo
diff options
context:
space:
mode:
authorMatthias Wachs <wachs@net.in.tum.de>2013-07-09 13:19:11 +0000
committerMatthias Wachs <wachs@net.in.tum.de>2013-07-09 13:19:11 +0000
commit22fa041be71030a5367ccb2f63158e22983aa49b (patch)
treefc064fbd85986e42d609ec60c57f2c0fe3384674 /src/peerinfo
parentc89d8a68bd97261f491927ebd32269d82eb9e581 (diff)
downloadgnunet-22fa041be71030a5367ccb2f63158e22983aa49b.tar.gz
gnunet-22fa041be71030a5367ccb2f63158e22983aa49b.zip
if io is enabled and shipped hellos not, hellos from peers we created should still be read
Diffstat (limited to 'src/peerinfo')
-rw-r--r--src/peerinfo/gnunet-service-peerinfo.c28
1 files changed, 15 insertions, 13 deletions
diff --git a/src/peerinfo/gnunet-service-peerinfo.c b/src/peerinfo/gnunet-service-peerinfo.c
index 5d62e7b52..dc4c9fa07 100644
--- a/src/peerinfo/gnunet-service-peerinfo.c
+++ b/src/peerinfo/gnunet-service-peerinfo.c
@@ -1239,7 +1239,7 @@ run (void *cls, struct GNUNET_SERVER_Handle *server,
1239 use_included = GNUNET_CONFIGURATION_get_value_yesno (cfg, "peerinfo", "USE_INCLUDED_HELLOS"); 1239 use_included = GNUNET_CONFIGURATION_get_value_yesno (cfg, "peerinfo", "USE_INCLUDED_HELLOS");
1240 GNUNET_SCHEDULER_add_delayed (GNUNET_TIME_UNIT_FOREVER_REL, &shutdown_task, 1240 GNUNET_SCHEDULER_add_delayed (GNUNET_TIME_UNIT_FOREVER_REL, &shutdown_task,
1241 NULL); 1241 NULL);
1242 if ((GNUNET_YES != noio) && (GNUNET_YES == use_included)) 1242 if (GNUNET_YES != noio)
1243 { 1243 {
1244 GNUNET_assert (GNUNET_OK == 1244 GNUNET_assert (GNUNET_OK ==
1245 GNUNET_CONFIGURATION_get_value_filename (cfg, "peerinfo", 1245 GNUNET_CONFIGURATION_get_value_filename (cfg, "peerinfo",
@@ -1257,23 +1257,25 @@ run (void *cls, struct GNUNET_SERVER_Handle *server,
1257 1257
1258 GNUNET_SCHEDULER_add_with_priority (GNUNET_SCHEDULER_PRIORITY_IDLE, 1258 GNUNET_SCHEDULER_add_with_priority (GNUNET_SCHEDULER_PRIORITY_IDLE,
1259 &cron_clean_data_hosts, NULL); 1259 &cron_clean_data_hosts, NULL);
1260 1260 if (GNUNET_YES == use_included)
1261 ip = GNUNET_OS_installation_get_path (GNUNET_OS_IPK_DATADIR); 1261 {
1262 GNUNET_asprintf (&peerdir, 1262 ip = GNUNET_OS_installation_get_path (GNUNET_OS_IPK_DATADIR);
1263 GNUNET_asprintf (&peerdir,
1263 "%shellos", 1264 "%shellos",
1264 ip); 1265 ip);
1265 GNUNET_free (ip); 1266 GNUNET_free (ip);
1266 1267
1267 GNUNET_log (GNUNET_ERROR_TYPE_INFO, 1268 GNUNET_log (GNUNET_ERROR_TYPE_INFO,
1268 _("Importing HELLOs from `%s'\n"), 1269 _("Importing HELLOs from `%s'\n"),
1269 peerdir); 1270 peerdir);
1270 dsc.matched = 0; 1271 dsc.matched = 0;
1271 dsc.remove_files = GNUNET_NO; 1272 dsc.remove_files = GNUNET_NO;
1272 1273
1273 GNUNET_DISK_directory_scan (peerdir, 1274 GNUNET_DISK_directory_scan (peerdir,
1274 &hosts_directory_scan_callback, &dsc); 1275 &hosts_directory_scan_callback, &dsc);
1275 1276
1276 GNUNET_free (peerdir); 1277 GNUNET_free (peerdir);
1278 }
1277 } 1279 }
1278 GNUNET_SERVER_add_handlers (server, handlers); 1280 GNUNET_SERVER_add_handlers (server, handlers);
1279 GNUNET_SERVER_disconnect_notify (server, &disconnect_cb, NULL) ; 1281 GNUNET_SERVER_disconnect_notify (server, &disconnect_cb, NULL) ;