migrating towards XDG configuration specification (#3000)
[oweals/gnunet.git] / src / experimentation / test_experimentation_clique_run.c
index b6329bb8e0836a721652f6729d248c07109128d9..62f6c74f684fb3b3d00cd5b764e7336d07e987db 100644 (file)
@@ -96,7 +96,7 @@ struct ExperimentationPeer
 };
 
 
-struct ExperimentationPeer ph[NUM_PEERS];
+struct ExperimentationPeer bp_slaves[NUM_PEERS];
 
 /**
  * Shutdown nicely
@@ -112,9 +112,9 @@ do_shutdown (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc)
 
   for (peer = 0; peer < NUM_PEERS; peer++)
   {
-       if (NULL != ph[peer].stat_op)
-               GNUNET_TESTBED_operation_done (ph[peer].stat_op);
-       ph[peer].stat_op = NULL;
+       if (NULL != bp_slaves[peer].stat_op)
+               GNUNET_TESTBED_operation_done (bp_slaves[peer].stat_op);
+       bp_slaves[peer].stat_op = NULL;
   }
 
   if (NULL != op)
@@ -171,8 +171,8 @@ check_end ()
 
        for (peer = 0; peer < NUM_PEERS; peer++)
        {
-               t_running_outbound_experiments += ph[peer].experiments_outbound_running;
-               t_running_inbound_experiments += ph[peer].experiments_inbound_running;
+               t_running_outbound_experiments += bp_slaves[peer].experiments_outbound_running;
+               t_running_inbound_experiments += bp_slaves[peer].experiments_inbound_running;
 
        }
 
@@ -318,6 +318,7 @@ stat_disconnect_adapter (void *cls, void *op_result)
  * Signature of a main function for a testcase.
  *
  * @param cls closure
+ * @param h the run handle
  * @param num_peers number of peers in 'peers'
  * @param peers_ handle to peers run in the testbed
  * @param links_succeeded the number of overlay link connection attempts that
@@ -326,7 +327,9 @@ stat_disconnect_adapter (void *cls, void *op_result)
  *          failed
  */
 static void
-test_master (void *cls, unsigned int num_peers,
+test_master (void *cls,
+             struct GNUNET_TESTBED_RunHandle *h,
+             unsigned int num_peers,
              struct GNUNET_TESTBED_Peer **peers_,
              unsigned int links_succeeded,
              unsigned int links_failed)
@@ -340,12 +343,12 @@ test_master (void *cls, unsigned int num_peers,
   {
     GNUNET_assert (NULL != peers_[peer]);
     /* Connect to peer's statistic service */
-    ph[peer].stat_op = GNUNET_TESTBED_service_connect (NULL,
+    bp_slaves[peer].stat_op = GNUNET_TESTBED_service_connect (NULL,
                                                                                                                                peers_[peer], "statistics",
-                                                                                                                               &stat_comp_cb, &ph[peer],
+                                                                                                                               &stat_comp_cb, &bp_slaves[peer],
                                     &stat_connect_adapter,
                                     &stat_disconnect_adapter,
-                                    &ph[peer]);
+                                    &bp_slaves[peer]);
 
   }
   peers = peers_;