aboutsummaryrefslogtreecommitdiff
path: root/src/transport/transport-testing.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/transport/transport-testing.c')
-rw-r--r--src/transport/transport-testing.c23
1 files changed, 12 insertions, 11 deletions
diff --git a/src/transport/transport-testing.c b/src/transport/transport-testing.c
index dcd95053b..01b313a15 100644
--- a/src/transport/transport-testing.c
+++ b/src/transport/transport-testing.c
@@ -518,22 +518,23 @@ GNUNET_TRANSPORT_TESTING_stop_peer (struct GNUNET_TRANSPORT_TESTING_handle *tth,
518} 518}
519 519
520/** 520/**
521 * Initiate peer p1 to connect to peer p2 521 * Connect the given peers and call the callback when both peers report the
522 * Get peer p2's HELLO and offer it to p1 522 * inbound connection. Remarks: start_peer's notify_connect callback can be called
523 * p1 then tries to connect to p2 523 * before.
524 *
525 * @param tth transport testing handle
524 * @param p1 peer 1 526 * @param p1 peer 1
525 * @param p2 peer 2 527 * @param p2 peer 2
526 * @param cb the callback to call when both peers notified that they are connected 528 * @param cb the callback to call when both peers notified that they are connected
527 * @param cb_cls callback cls (or a pointer to the 529 * @param cls callback cls
528 * GNUNET_TRANSPORT_TESTING_ConnectRequest itself if null) 530 * @return a connect request handle
529 * @return connect context
530 */ 531 */
531GNUNET_TRANSPORT_TESTING_ConnectRequest 532GNUNET_TRANSPORT_TESTING_ConnectRequest
532GNUNET_TRANSPORT_TESTING_connect_peers (struct GNUNET_TRANSPORT_TESTING_handle 533GNUNET_TRANSPORT_TESTING_connect_peers (struct GNUNET_TRANSPORT_TESTING_handle *tth,
533 *tth, struct PeerContext *p1, 534 struct PeerContext *p1,
534 struct PeerContext *p2, 535 struct PeerContext *p2,
535 GNUNET_TRANSPORT_TESTING_connect_cb cb, 536 GNUNET_TRANSPORT_TESTING_connect_cb cb,
536 void *cb_cls) 537 void *cls)
537{ 538{
538 GNUNET_assert (tth != NULL); 539 GNUNET_assert (tth != NULL);
539 540
@@ -547,8 +548,8 @@ GNUNET_TRANSPORT_TESTING_connect_peers (struct GNUNET_TRANSPORT_TESTING_handle
547 cc->p2 = p2; 548 cc->p2 = p2;
548 549
549 cc->cb = cb; 550 cc->cb = cb;
550 if (cb_cls != NULL) 551 if (cls != NULL)
551 cc->cb_cls = cb_cls; 552 cc->cb_cls = cls;
552 else 553 else
553 cc->cb_cls = cc; 554 cc->cb_cls = cc;
554 555