From 958ccc2a0f95bce517efb41addb28039f9fb8b38 Mon Sep 17 00:00:00 2001 From: Matthias Wachs Date: Tue, 18 May 2010 08:08:31 +0000 Subject: --- src/hostlist/gnunet-daemon-hostlist.c | 1 + src/hostlist/test_gnunet_daemon_hostlist_data.conf | 1 - .../test_gnunet_daemon_hostlist_learning.c | 31 +++------------------- src/hostlist/test_learning_learn_peer.conf | 2 +- 4 files changed, 5 insertions(+), 30 deletions(-) (limited to 'src') 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, GNUNET_SCHEDULER_add_delayed (sched, GNUNET_TIME_UNIT_FOREVER_REL, &cleaning_task, NULL); + if (NULL == core) { 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 [datastore] AUTOSTART = NO - 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; static char * current_adv_uri; -static struct GNUNET_CONFIGURATION_Handle *cfg; +static const struct GNUNET_CONFIGURATION_Handle *cfg; static struct GNUNET_SCHEDULER_Handle *sched; static GNUNET_SCHEDULER_TaskIdentifier timeout_task; @@ -76,27 +76,6 @@ static struct GNUNET_STATISTICS_GetHandle * download_stats; static struct GNUNET_STATISTICS_GetHandle * urisrecv_stat; static struct GNUNET_STATISTICS_GetHandle * advsent_stat; - -static void -waitpid_task (void *cls, - const struct GNUNET_SCHEDULER_TaskContext *tc) -{ - struct PeerContext *p = cls; - -#if START_ARM - GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, - "Killing ARM process.\n"); - if (0 != PLIBC_KILL (p->arm_pid, SIGTERM)) - GNUNET_log_strerror (GNUNET_ERROR_TYPE_WARNING, "kill"); - if (GNUNET_OS_process_wait(p->arm_pid) != GNUNET_OK) - GNUNET_log_strerror (GNUNET_ERROR_TYPE_WARNING, "waitpid"); - GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, - "ARM process %u stopped\n", p->arm_pid); -#endif - GNUNET_CONFIGURATION_destroy (p->cfg); -} - - static void shutdown_testcase() { GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Shutdown testcase....\n"); @@ -174,12 +153,7 @@ static void shutdown_testcase() GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Hostlist client ARM process %u stopped\n", learn_peer.arm_pid); #endif -/* - if (NULL != learn_peer.cfg) - GNUNET_CONFIGURATION_destroy (learn_peer.cfg); - if (NULL != adv_peer.cfg) - GNUNET_CONFIGURATION_destroy (adv_peer.cfg); -*/ + GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Shutting down scheduler\n"); GNUNET_SCHEDULER_shutdown (sched); GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Shutdown complete....\n"); @@ -362,6 +336,7 @@ static int ad_arrive_handler (void *cls, GNUNET_log (GNUNET_ERROR_TYPE_INFO, "Recieved hostlist advertisement with URI `%s' as expected\n", current_adv_uri); adv_arrived = GNUNET_YES; + adv_sent = GNUNET_YES; } else 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 AUTOSTART = NO [datastore] -AUTOSTART = NO \ No newline at end of file +AUTOSTART = NO -- cgit v1.2.3