diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/hostlist/gnunet-daemon-hostlist.c | 1 | ||||
-rw-r--r-- | src/hostlist/test_gnunet_daemon_hostlist_data.conf | 1 | ||||
-rw-r--r-- | src/hostlist/test_gnunet_daemon_hostlist_learning.c | 31 | ||||
-rw-r--r-- | src/hostlist/test_learning_learn_peer.conf | 2 |
4 files changed, 5 insertions, 30 deletions
diff --git a/src/hostlist/gnunet-daemon-hostlist.c b/src/hostlist/gnunet-daemon-hostlist.c index 9d85e6672..bbc0d7e08 100644 --- a/src/hostlist/gnunet-daemon-hostlist.c +++ b/src/hostlist/gnunet-daemon-hostlist.c | |||
@@ -326,6 +326,7 @@ run (void *cls, | |||
326 | GNUNET_SCHEDULER_add_delayed (sched, | 326 | GNUNET_SCHEDULER_add_delayed (sched, |
327 | GNUNET_TIME_UNIT_FOREVER_REL, | 327 | GNUNET_TIME_UNIT_FOREVER_REL, |
328 | &cleaning_task, NULL); | 328 | &cleaning_task, NULL); |
329 | |||
329 | if (NULL == core) | 330 | if (NULL == core) |
330 | { | 331 | { |
331 | GNUNET_log (GNUNET_ERROR_TYPE_ERROR, | 332 | GNUNET_log (GNUNET_ERROR_TYPE_ERROR, |
diff --git a/src/hostlist/test_gnunet_daemon_hostlist_data.conf b/src/hostlist/test_gnunet_daemon_hostlist_data.conf index 059f59831..41fafd8b8 100644 --- a/src/hostlist/test_gnunet_daemon_hostlist_data.conf +++ b/src/hostlist/test_gnunet_daemon_hostlist_data.conf | |||
@@ -59,4 +59,3 @@ AUTOSTART = NO | |||
59 | 59 | ||
60 | [datastore] | 60 | [datastore] |
61 | AUTOSTART = NO | 61 | AUTOSTART = NO |
62 | |||
diff --git a/src/hostlist/test_gnunet_daemon_hostlist_learning.c b/src/hostlist/test_gnunet_daemon_hostlist_learning.c index 828a49a0d..284c1439d 100644 --- a/src/hostlist/test_gnunet_daemon_hostlist_learning.c +++ b/src/hostlist/test_gnunet_daemon_hostlist_learning.c | |||
@@ -50,7 +50,7 @@ static int learned_hostlist_downloaded; | |||
50 | 50 | ||
51 | static char * current_adv_uri; | 51 | static char * current_adv_uri; |
52 | 52 | ||
53 | static struct GNUNET_CONFIGURATION_Handle *cfg; | 53 | static const struct GNUNET_CONFIGURATION_Handle *cfg; |
54 | static struct GNUNET_SCHEDULER_Handle *sched; | 54 | static struct GNUNET_SCHEDULER_Handle *sched; |
55 | 55 | ||
56 | static GNUNET_SCHEDULER_TaskIdentifier timeout_task; | 56 | static GNUNET_SCHEDULER_TaskIdentifier timeout_task; |
@@ -76,27 +76,6 @@ static struct GNUNET_STATISTICS_GetHandle * download_stats; | |||
76 | static struct GNUNET_STATISTICS_GetHandle * urisrecv_stat; | 76 | static struct GNUNET_STATISTICS_GetHandle * urisrecv_stat; |
77 | static struct GNUNET_STATISTICS_GetHandle * advsent_stat; | 77 | static struct GNUNET_STATISTICS_GetHandle * advsent_stat; |
78 | 78 | ||
79 | |||
80 | static void | ||
81 | waitpid_task (void *cls, | ||
82 | const struct GNUNET_SCHEDULER_TaskContext *tc) | ||
83 | { | ||
84 | struct PeerContext *p = cls; | ||
85 | |||
86 | #if START_ARM | ||
87 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, | ||
88 | "Killing ARM process.\n"); | ||
89 | if (0 != PLIBC_KILL (p->arm_pid, SIGTERM)) | ||
90 | GNUNET_log_strerror (GNUNET_ERROR_TYPE_WARNING, "kill"); | ||
91 | if (GNUNET_OS_process_wait(p->arm_pid) != GNUNET_OK) | ||
92 | GNUNET_log_strerror (GNUNET_ERROR_TYPE_WARNING, "waitpid"); | ||
93 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, | ||
94 | "ARM process %u stopped\n", p->arm_pid); | ||
95 | #endif | ||
96 | GNUNET_CONFIGURATION_destroy (p->cfg); | ||
97 | } | ||
98 | |||
99 | |||
100 | static void shutdown_testcase() | 79 | static void shutdown_testcase() |
101 | { | 80 | { |
102 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Shutdown testcase....\n"); | 81 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Shutdown testcase....\n"); |
@@ -174,12 +153,7 @@ static void shutdown_testcase() | |||
174 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, | 153 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, |
175 | "Hostlist client ARM process %u stopped\n", learn_peer.arm_pid); | 154 | "Hostlist client ARM process %u stopped\n", learn_peer.arm_pid); |
176 | #endif | 155 | #endif |
177 | /* | 156 | |
178 | if (NULL != learn_peer.cfg) | ||
179 | GNUNET_CONFIGURATION_destroy (learn_peer.cfg); | ||
180 | if (NULL != adv_peer.cfg) | ||
181 | GNUNET_CONFIGURATION_destroy (adv_peer.cfg); | ||
182 | */ | ||
183 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Shutting down scheduler\n"); | 157 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Shutting down scheduler\n"); |
184 | GNUNET_SCHEDULER_shutdown (sched); | 158 | GNUNET_SCHEDULER_shutdown (sched); |
185 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Shutdown complete....\n"); | 159 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Shutdown complete....\n"); |
@@ -362,6 +336,7 @@ static int ad_arrive_handler (void *cls, | |||
362 | GNUNET_log (GNUNET_ERROR_TYPE_INFO, | 336 | GNUNET_log (GNUNET_ERROR_TYPE_INFO, |
363 | "Recieved hostlist advertisement with URI `%s' as expected\n", current_adv_uri); | 337 | "Recieved hostlist advertisement with URI `%s' as expected\n", current_adv_uri); |
364 | adv_arrived = GNUNET_YES; | 338 | adv_arrived = GNUNET_YES; |
339 | adv_sent = GNUNET_YES; | ||
365 | } | 340 | } |
366 | else | 341 | else |
367 | GNUNET_log (GNUNET_ERROR_TYPE_ERROR, | 342 | GNUNET_log (GNUNET_ERROR_TYPE_ERROR, |
diff --git a/src/hostlist/test_learning_learn_peer.conf b/src/hostlist/test_learning_learn_peer.conf index 7bc247391..4b259e2b0 100644 --- a/src/hostlist/test_learning_learn_peer.conf +++ b/src/hostlist/test_learning_learn_peer.conf | |||
@@ -51,4 +51,4 @@ HOSTLISTFILE = hostlists_learn_peer.file | |||
51 | AUTOSTART = NO | 51 | AUTOSTART = NO |
52 | 52 | ||
53 | [datastore] | 53 | [datastore] |
54 | AUTOSTART = NO \ No newline at end of file | 54 | AUTOSTART = NO |