aboutsummaryrefslogtreecommitdiff
path: root/src/messenger/testing_messenger_setup.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/messenger/testing_messenger_setup.c')
-rw-r--r--src/messenger/testing_messenger_setup.c41
1 files changed, 30 insertions, 11 deletions
diff --git a/src/messenger/testing_messenger_setup.c b/src/messenger/testing_messenger_setup.c
index 98241fa08..3cde8c9bb 100644
--- a/src/messenger/testing_messenger_setup.c
+++ b/src/messenger/testing_messenger_setup.c
@@ -204,7 +204,9 @@ end_error_cb (void *cls)
204} 204}
205 205
206static void 206static void
207barrier2_wait_cb (void *cls, struct GNUNET_BarrierWaitHandle *waiting, int status) 207barrier2_wait_cb (void *cls,
208 struct GNUNET_BarrierWaitHandle *waiting,
209 int status)
208{ 210{
209 struct test_peer *peer = cls; 211 struct test_peer *peer = cls;
210 212
@@ -215,7 +217,9 @@ barrier2_wait_cb (void *cls, struct GNUNET_BarrierWaitHandle *waiting, int statu
215} 217}
216 218
217static void 219static void
218barrier_wait_cb (void *cls, struct GNUNET_BarrierWaitHandle *waiting, int status) 220barrier_wait_cb (void *cls,
221 struct GNUNET_BarrierWaitHandle *waiting,
222 int status)
219{ 223{
220 struct test_peer *peer = cls; 224 struct test_peer *peer = cls;
221 225
@@ -259,8 +263,11 @@ barrier_wait_cb (void *cls, struct GNUNET_BarrierWaitHandle *waiting, int status
259 * @param flags Flags of message 263 * @param flags Flags of message
260 */ 264 */
261static void 265static void
262on_message (void *cls, struct GNUNET_MESSENGER_Room *room, const struct GNUNET_MESSENGER_Contact *sender, 266on_message (void *cls,
263 const struct GNUNET_MESSENGER_Message *message, const struct GNUNET_HashCode *hash, 267 struct GNUNET_MESSENGER_Room *room,
268 const struct GNUNET_MESSENGER_Contact *sender,
269 const struct GNUNET_MESSENGER_Message *message,
270 const struct GNUNET_HashCode *hash,
264 enum GNUNET_MESSENGER_MessageFlags flags) 271 enum GNUNET_MESSENGER_MessageFlags flags)
265{ 272{
266 struct test_peer *peer = cls; 273 struct test_peer *peer = cls;
@@ -340,7 +347,9 @@ second_stage (void *cls)
340} 347}
341 348
342static void 349static void
343on_peer (void *cb_cls, struct GNUNET_TESTBED_Operation *op, const struct GNUNET_TESTBED_PeerInformation *pinfo, 350on_peer (void *cb_cls,
351 struct GNUNET_TESTBED_Operation *op,
352 const struct GNUNET_TESTBED_PeerInformation *pinfo,
344 const char *emsg) 353 const char *emsg)
345{ 354{
346 struct test_peer *peer = cb_cls; 355 struct test_peer *peer = cb_cls;
@@ -396,7 +405,8 @@ on_peer (void *cb_cls, struct GNUNET_TESTBED_Operation *op, const struct GNUNET_
396 * @param event Information about the event 405 * @param event Information about the event
397 */ 406 */
398static void 407static void
399run (void *cls, const struct GNUNET_TESTBED_EventInformation *event) 408run (void *cls,
409 const struct GNUNET_TESTBED_EventInformation *event)
400{ 410{
401 struct test_properties *properties = cls; 411 struct test_properties *properties = cls;
402 412
@@ -420,7 +430,9 @@ run (void *cls, const struct GNUNET_TESTBED_EventInformation *event)
420} 430}
421 431
422static void 432static void
423barrier2_cb (void *cls, struct GNUNET_BarrierHandle *barrier, int status) 433barrier2_cb (void *cls,
434 struct GNUNET_BarrierHandle *barrier,
435 int status)
424{ 436{
425 struct test_properties *properties = cls; 437 struct test_properties *properties = cls;
426 438
@@ -449,7 +461,9 @@ barrier2_cb (void *cls, struct GNUNET_BarrierHandle *barrier, int status)
449} 461}
450 462
451static void 463static void
452barrier_cb (void *cls, struct GNUNET_BarrierHandle *barrier, int status) 464barrier_cb (void *cls,
465 struct GNUNET_BarrierHandle *barrier,
466 int status)
453{ 467{
454 struct test_properties *properties = cls; 468 struct test_properties *properties = cls;
455 469
@@ -485,8 +499,12 @@ barrier_cb (void *cls, struct GNUNET_BarrierHandle *barrier, int status)
485} 499}
486 500
487static void 501static void
488init (void *cls, struct GNUNET_TESTBED_RunHandle *h, unsigned int num_peers, struct GNUNET_TESTBED_Peer **peers, 502init (void *cls,
489 unsigned int links_succeeded, unsigned int links_failed) 503 struct GNUNET_TESTBED_RunHandle *h,
504 unsigned int num_peers,
505 struct GNUNET_TESTBED_Peer **peers,
506 unsigned int links_succeeded,
507 unsigned int links_failed)
490{ 508{
491 struct test_properties *properties = cls; 509 struct test_properties *properties = cls;
492 510
@@ -500,7 +518,8 @@ init (void *cls, struct GNUNET_TESTBED_RunHandle *h, unsigned int num_peers, str
500} 518}
501 519
502int 520int
503GNUNET_run_messenger_setup (const char* test_name, const struct test_configuration *cfg) 521GNUNET_run_messenger_setup (const char* test_name,
522 const struct test_configuration *cfg)
504{ 523{
505 struct test_properties properties; 524 struct test_properties properties;
506 memset(&properties, 0, sizeof(properties)); 525 memset(&properties, 0, sizeof(properties));