- start test only after warmup
[oweals/gnunet.git] / src / mesh / mesh_test_lib.c
index 022cee2f38cf133c7dd59c6c9ffe89d964c9228c..0229a5bb19907a15e2307dceb8233802dd8876db 100644 (file)
@@ -25,7 +25,7 @@
 #include "platform.h"
 #include "gnunet_util_lib.h"
 #include "mesh_test_lib.h"
-#include "gnunet_mesh_service_enc.h"
+#include "gnunet_mesh_service.h"
 
 /**
  * Test context for a MESH Test.
@@ -237,7 +237,7 @@ mesh_test_run (void *cls,
   for (i = 0; i < num_peers; i++)
   {
     struct GNUNET_MESH_TEST_AdapterContext *newctx;
-    newctx = GNUNET_malloc (sizeof (struct GNUNET_MESH_TEST_AdapterContext));
+    newctx = GNUNET_new (struct GNUNET_MESH_TEST_AdapterContext);
     newctx->peer = i;
     newctx->ctx = ctx;
     ctx->ops[i] = GNUNET_TESTBED_service_connect (ctx,
@@ -265,7 +265,7 @@ GNUNET_MESH_TEST_run (const char *testname,
 {
   struct GNUNET_MESH_TEST_Context *ctx;
 
-  ctx = GNUNET_malloc (sizeof (struct GNUNET_MESH_TEST_Context));
+  ctx = GNUNET_new (struct GNUNET_MESH_TEST_Context);
   ctx->num_peers = num_peers;
   ctx->ops = GNUNET_malloc (num_peers * sizeof (struct GNUNET_TESTBED_Operation *));
   ctx->meshes = GNUNET_malloc (num_peers * sizeof (struct GNUNET_MESH_Handle *));