fix memory leak
[oweals/gnunet.git] / src / dv / test_transport_blacklist.c
index e8cd5102b52cf3c72bb6d4ecf089ec708f514981..e40418a42048a79a30157b6123eaa0d66dbb0242 100644 (file)
@@ -1,6 +1,6 @@
 /*
      This file is part of GNUnet.
-     (C) 2009, 2013 Christian Grothoff (and other contributing authors)
+     Copyright (C) 2009, 2013 GNUnet e.V.
 
      GNUnet is free software; you can redistribute it and/or modify
      it under the terms of the GNU General Public License as published
@@ -14,8 +14,8 @@
 
      You should have received a copy of the GNU General Public License
      along with GNUnet; see the file COPYING.  If not, write to the
-     Free Software Foundation, Inc., 59 Temple Place - Suite 330,
-     Boston, MA 02111-1307, USA.
+     Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+     Boston, MA 02110-1301, USA.
 */
 /**
  * @file dv/test_transport_blacklist.c
@@ -33,16 +33,24 @@ static int ok;
 
 static void
 test_connection (void *cls,
+                 struct GNUNET_TESTBED_RunHandle *h,
                 unsigned int num_peers,
                 struct GNUNET_TESTBED_Peer **peers,
                  unsigned int links_succeeded,
                  unsigned int links_failed)
 {
-  if (4 == num_peers)
+  GNUNET_log (GNUNET_ERROR_TYPE_INFO, "Links successful %u / %u failed\n", links_succeeded, links_failed);
+  if ( (4 == num_peers) && (0 == links_failed) )
   {
-    fprintf (stderr, "Testbed connect peers despite blacklist!\n");
+    GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
+               "Testbed connect peers despite blacklist!\n");
     ok = 1;
   }
+  else
+  {
+    GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
+               "Note that getting a message about a timeout during setup is expected for this test.\n");
+  }
   GNUNET_SCHEDULER_shutdown ();
 }