aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/testing/testing_group.c43
1 files changed, 41 insertions, 2 deletions
diff --git a/src/testing/testing_group.c b/src/testing/testing_group.c
index 1a4a7f6e9..917a524de 100644
--- a/src/testing/testing_group.c
+++ b/src/testing/testing_group.c
@@ -33,6 +33,41 @@
33 */ 33 */
34struct GNUNET_TESTING_PeerGroup 34struct GNUNET_TESTING_PeerGroup
35{ 35{
36 /**
37 * Our scheduler.
38 */
39 struct GNUNET_SCHEDULER_Handle *sched;
40
41 /**
42 * Configuration template.
43 */
44 struct GNUNET_CONFIGURATION_Handle *cfg;
45
46 /**
47 * Function to call on each started daemon.
48 */
49 GNUNET_TESTING_NotifyDaemonRunning cb;
50
51 /**
52 * Closure for cb.
53 */
54 void *cb_cls;
55
56 /**
57 * NULL-terminated array of hostnames.
58 */
59 char **hostnames;
60
61 /**
62 * Array of "total" peers.
63 */
64 struct GNUNET_TESTING_Daemon **peers;
65
66 /**
67 * Number of peers in this group.
68 */
69 unsigned int total;
70
36}; 71};
37 72
38 73
@@ -63,7 +98,10 @@ GNUNET_TESTING_daemons_start_va (struct GNUNET_SCHEDULER_Handle *sched,
63 const char *hostname, 98 const char *hostname,
64 va_list va) 99 va_list va)
65{ 100{
66 return NULL; 101 struct GNUNET_TESTING_PeerGroup *pg;
102
103 pg = GNUNET_malloc (sizeof(struct GNUNET_TESTING_PeerGroup));
104 return pg;
67} 105}
68 106
69 107
@@ -115,8 +153,9 @@ GNUNET_TESTING_daemons_start (struct GNUNET_SCHEDULER_Handle *sched,
115 */ 153 */
116void 154void
117GNUNET_TESTING_daemons_stop (struct GNUNET_TESTING_PeerGroup *pg) 155GNUNET_TESTING_daemons_stop (struct GNUNET_TESTING_PeerGroup *pg)
118
119{ 156{
157
158 GNUNET_free (pg);
120} 159}
121 160
122 161