(no commit message)
authorMatthias Wachs <wachs@net.in.tum.de>
Tue, 25 May 2010 08:14:07 +0000 (08:14 +0000)
committerMatthias Wachs <wachs@net.in.tum.de>
Tue, 25 May 2010 08:14:07 +0000 (08:14 +0000)
src/hostlist/test_gnunet_daemon_hostlist_learning.c

index e15802675f634ff5f7260e4ba7197edfadbeeb12..5e6c673dd259867c67724bd500c5cd0cece6ab05 100644 (file)
@@ -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,