aboutsummaryrefslogtreecommitdiff
path: root/src/consensus
diff options
context:
space:
mode:
authorSree Harsha Totakura <totakura@in.tum.de>2013-03-28 16:47:02 +0000
committerSree Harsha Totakura <totakura@in.tum.de>2013-03-28 16:47:02 +0000
commit949f21f03df9f08b0a73c3e47a798e63790edf7f (patch)
tree52f56432e08a0b83cfc155e1af45e1587d32073d /src/consensus
parent8f8e6a5bb1ccbb7d1311332ec1cc3a340bdd621f (diff)
downloadgnunet-949f21f03df9f08b0a73c3e47a798e63790edf7f.tar.gz
gnunet-949f21f03df9f08b0a73c3e47a798e63790edf7f.zip
provide how many links succeeded and how many failed in test master callback
from GNUNET_TESTBED_run() and GNUNET_TESTBED_test_run() functions
Diffstat (limited to 'src/consensus')
-rw-r--r--src/consensus/gnunet-consensus-start-peers.c16
-rw-r--r--src/consensus/gnunet-consensus.c16
2 files changed, 30 insertions, 2 deletions
diff --git a/src/consensus/gnunet-consensus-start-peers.c b/src/consensus/gnunet-consensus-start-peers.c
index fb7f047ae..ad88b0f08 100644
--- a/src/consensus/gnunet-consensus-start-peers.c
+++ b/src/consensus/gnunet-consensus-start-peers.c
@@ -105,10 +105,24 @@ controller_cb(void *cls,
105 105
106 106
107 107
108/**
109 * Signature of a main function for a testcase.
110 *
111 * @param cls closure
112 * @param num_peers number of peers in 'peers'
113 * @param peers handle to peers run in the testbed. NULL upon timeout (see
114 * GNUNET_TESTBED_test_run()).
115 * @param links_succeeded the number of overlay link connection attempts that
116 * succeeded
117 * @param links_failed the number of overlay link connection attempts that
118 * failed
119 */
108static void 120static void
109test_master (void *cls, 121test_master (void *cls,
110 unsigned int num_peers, 122 unsigned int num_peers,
111 struct GNUNET_TESTBED_Peer **started_peers) 123 struct GNUNET_TESTBED_Peer **started_peers,
124 unsigned int links_succeeded,
125 unsigned int links_failed)
112{ 126{
113 int i; 127 int i;
114 128
diff --git a/src/consensus/gnunet-consensus.c b/src/consensus/gnunet-consensus.c
index 4525fc719..2524a20ca 100644
--- a/src/consensus/gnunet-consensus.c
+++ b/src/consensus/gnunet-consensus.c
@@ -276,10 +276,24 @@ peer_info_cb (void *cb_cls,
276} 276}
277 277
278 278
279/**
280 * Signature of a main function for a testcase.
281 *
282 * @param cls closure
283 * @param num_peers number of peers in 'peers'
284 * @param peers handle to peers run in the testbed. NULL upon timeout (see
285 * GNUNET_TESTBED_test_run()).
286 * @param links_succeeded the number of overlay link connection attempts that
287 * succeeded
288 * @param links_failed the number of overlay link connection attempts that
289 * failed
290 */
279static void 291static void
280test_master (void *cls, 292test_master (void *cls,
281 unsigned int num_peers, 293 unsigned int num_peers,
282 struct GNUNET_TESTBED_Peer **started_peers) 294 struct GNUNET_TESTBED_Peer **started_peers,
295 unsigned int links_succeeded,
296 unsigned int links_failed)
283{ 297{
284 int i; 298 int i;
285 299