From d8a43dd206a34f83c274f738bc688b75b8c2561a Mon Sep 17 00:00:00 2001 From: Matthias Wachs Date: Tue, 25 May 2010 08:14:07 +0000 Subject: [PATCH] --- src/hostlist/test_gnunet_daemon_hostlist_learning.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/hostlist/test_gnunet_daemon_hostlist_learning.c b/src/hostlist/test_gnunet_daemon_hostlist_learning.c index e15802675..5e6c673dd 100644 --- a/src/hostlist/test_gnunet_daemon_hostlist_learning.c +++ b/src/hostlist/test_gnunet_daemon_hostlist_learning.c @@ -183,14 +183,13 @@ process_downloads (void *cls, int is_persistent) { download_stats = NULL; - if ( ((struct PeerContext *) cls == &learn_peer) && (value == 2) && (learned_hostlist_downloaded == GNUNET_NO) ) + if ( (value == 2) && (learned_hostlist_downloaded == GNUNET_NO) ) { GNUNET_log (GNUNET_ERROR_TYPE_INFO, _("Peer has successfully downloaded advertised URI \n")); learned_hostlist_downloaded = GNUNET_YES; - } - if (GNUNET_NO != learned_hostlist_downloaded) shutdown_testcase(); + } return GNUNET_OK; } @@ -467,6 +466,9 @@ check () failed = GNUNET_NO; + if (learned_hostlist_downloaded == GNUNET_YES) + return GNUNET_YES; + if (timeout == GNUNET_YES) { GNUNET_log (GNUNET_ERROR_TYPE_ERROR, -- 2.25.1