aboutsummaryrefslogtreecommitdiff
path: root/src/cadet/test_cadet.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/cadet/test_cadet.c')
-rw-r--r--src/cadet/test_cadet.c11
1 files changed, 9 insertions, 2 deletions
diff --git a/src/cadet/test_cadet.c b/src/cadet/test_cadet.c
index 779d3bc9f..23f2ccbe3 100644
--- a/src/cadet/test_cadet.c
+++ b/src/cadet/test_cadet.c
@@ -550,6 +550,7 @@ get_from_p_ids ()
550 } 550 }
551} 551}
552 552
553
553static struct GNUNET_CADET_Handle * 554static struct GNUNET_CADET_Handle *
554get_from_cadets () 555get_from_cadets ()
555{ 556{
@@ -568,6 +569,7 @@ get_from_cadets ()
568 569
569} 570}
570 571
572
571static unsigned int 573static unsigned int
572get_peer_nr (int outgoing) 574get_peer_nr (int outgoing)
573{ 575{
@@ -581,6 +583,7 @@ get_peer_nr (int outgoing)
581 } 583 }
582} 584}
583 585
586
584/** 587/**
585 * Task to reconnect to other peer. 588 * Task to reconnect to other peer.
586 * 589 *
@@ -626,6 +629,7 @@ reconnect_op (void *cls)
626 send_test_message (outgoing_ch); 629 send_test_message (outgoing_ch);
627} 630}
628 631
632
629void 633void
630reopen_channel () 634reopen_channel ()
631{ 635{
@@ -659,6 +663,7 @@ reopen_channel ()
659 send_test_message (outgoing_ch); 663 send_test_message (outgoing_ch);
660} 664}
661 665
666
662static void 667static void
663peers_callback (void *cls, const struct GNUNET_CADET_PeerListEntry *ple); 668peers_callback (void *cls, const struct GNUNET_CADET_PeerListEntry *ple);
664 669
@@ -676,6 +681,7 @@ get_peers (void *cls)
676 681
677} 682}
678 683
684
679/** 685/**
680 * Method called to retrieve information about all peers in CADET, called 686 * Method called to retrieve information about all peers in CADET, called
681 * once per peer. 687 * once per peer.
@@ -712,7 +718,7 @@ peers_callback (void *cls, const struct GNUNET_CADET_PeerListEntry *ple)
712 "p_id %s\n", 718 "p_id %s\n",
713 GNUNET_i2s_full (p_id)); 719 GNUNET_i2s_full (p_id));
714 720
715 if ((0 == GNUNET_memcmp (&ple->peer, p_id))&& ple->have_tunnel) 721 if ((0 == GNUNET_memcmp (&ple->peer, p_id)) && ple->have_tunnel)
716 { 722 {
717 723
718 GNUNET_log (GNUNET_ERROR_TYPE_INFO, 724 GNUNET_log (GNUNET_ERROR_TYPE_INFO,
@@ -733,6 +739,7 @@ peers_callback (void *cls, const struct GNUNET_CADET_PeerListEntry *ple)
733 } 739 }
734} 740}
735 741
742
736/** 743/**
737 * Function called whenever an MQ-channel is destroyed, unless the destruction 744 * Function called whenever an MQ-channel is destroyed, unless the destruction
738 * was requested by #GNUNET_CADET_channel_destroy. 745 * was requested by #GNUNET_CADET_channel_destroy.
@@ -1169,7 +1176,7 @@ connect_handler (void *cls,
1169 1176
1170 if (peer == get_peer_nr (GNUNET_NO)) 1177 if (peer == get_peer_nr (GNUNET_NO))
1171 { 1178 {
1172 if ((DESTROY != test)&&(NULL != incoming_ch)) 1179 if ((DESTROY != test) && (NULL != incoming_ch))
1173 { 1180 {
1174 GNUNET_log (GNUNET_ERROR_TYPE_ERROR, 1181 GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
1175 "Duplicate incoming channel for client %lu\n", 1182 "Duplicate incoming channel for client %lu\n",