diff options
author | Matthias Wachs <wachs@net.in.tum.de> | 2010-04-20 14:26:45 +0000 |
---|---|---|
committer | Matthias Wachs <wachs@net.in.tum.de> | 2010-04-20 14:26:45 +0000 |
commit | a61f7e5a34d22fbaca6473e323a8f57500c8ca92 (patch) | |
tree | a51eec9f9ba17fa5e06b8f9de256356dc16dd194 /src | |
parent | a7d344a3652399616bd6bd6e0f52f8df3e6e9110 (diff) | |
download | gnunet-a61f7e5a34d22fbaca6473e323a8f57500c8ca92.tar.gz gnunet-a61f7e5a34d22fbaca6473e323a8f57500c8ca92.zip |
Diffstat (limited to 'src')
-rw-r--r-- | src/hostlist/test_gnunet_daemon_hostlist_learning.c | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/src/hostlist/test_gnunet_daemon_hostlist_learning.c b/src/hostlist/test_gnunet_daemon_hostlist_learning.c index 9d45c01ae..fb9446bc4 100644 --- a/src/hostlist/test_gnunet_daemon_hostlist_learning.c +++ b/src/hostlist/test_gnunet_daemon_hostlist_learning.c | |||
@@ -206,6 +206,8 @@ static struct GNUNET_CORE_MessageHandler learn_handlers[] = { | |||
206 | static void | 206 | static void |
207 | setup_learn_peer (struct PeerContext *p, const char *cfgname) | 207 | setup_learn_peer (struct PeerContext *p, const char *cfgname) |
208 | { | 208 | { |
209 | char * filename; | ||
210 | unsigned int result; | ||
209 | p->cfg = GNUNET_CONFIGURATION_create (); | 211 | p->cfg = GNUNET_CONFIGURATION_create (); |
210 | #if START_ARM | 212 | #if START_ARM |
211 | p->arm_pid = GNUNET_OS_start_process (NULL, NULL, "gnunet-service-arm", | 213 | p->arm_pid = GNUNET_OS_start_process (NULL, NULL, "gnunet-service-arm", |
@@ -216,6 +218,20 @@ setup_learn_peer (struct PeerContext *p, const char *cfgname) | |||
216 | "-c", cfgname, NULL); | 218 | "-c", cfgname, NULL); |
217 | #endif | 219 | #endif |
218 | GNUNET_assert (GNUNET_OK == GNUNET_CONFIGURATION_load (p->cfg, cfgname)); | 220 | GNUNET_assert (GNUNET_OK == GNUNET_CONFIGURATION_load (p->cfg, cfgname)); |
221 | if (GNUNET_OK == GNUNET_CONFIGURATION_get_value_string (p->cfg, | ||
222 | "HOSTLIST", | ||
223 | "HOSTLISTFILE", | ||
224 | &filename)) | ||
225 | { | ||
226 | if ( GNUNET_YES == GNUNET_DISK_file_test (filename) ) | ||
227 | { | ||
228 | result = remove (filename); | ||
229 | if (result == 0) | ||
230 | GNUNET_log (GNUNET_ERROR_TYPE_INFO, | ||
231 | _("Hostlist hostlist file `%s' was removed\n"),filename); | ||
232 | } | ||
233 | } | ||
234 | GNUNET_free ( filename ); | ||
219 | GNUNET_ARM_start_services (p->cfg, sched, "core", NULL); | 235 | GNUNET_ARM_start_services (p->cfg, sched, "core", NULL); |
220 | 236 | ||
221 | p->core = GNUNET_CORE_connect (sched, p->cfg, | 237 | p->core = GNUNET_CORE_connect (sched, p->cfg, |