diff options
author | Christian Grothoff <christian@grothoff.org> | 2017-03-26 04:14:43 +0200 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2017-03-26 04:14:43 +0200 |
commit | 7978b76868ba81efaa4b65b47a54ee55cd092382 (patch) | |
tree | 7248f8a1c07364ba66435fe31d915e50df138d4c /src/cadet/gnunet-service-cadet_tunnels.c | |
parent | 9cfc671375ef346c3ff40fbcdd7c2c090972072a (diff) | |
download | gnunet-7978b76868ba81efaa4b65b47a54ee55cd092382.tar.gz gnunet-7978b76868ba81efaa4b65b47a54ee55cd092382.zip |
implement #4973
Diffstat (limited to 'src/cadet/gnunet-service-cadet_tunnels.c')
-rw-r--r-- | src/cadet/gnunet-service-cadet_tunnels.c | 23 |
1 files changed, 12 insertions, 11 deletions
diff --git a/src/cadet/gnunet-service-cadet_tunnels.c b/src/cadet/gnunet-service-cadet_tunnels.c index bcdeeb4da..28004debc 100644 --- a/src/cadet/gnunet-service-cadet_tunnels.c +++ b/src/cadet/gnunet-service-cadet_tunnels.c | |||
@@ -2723,8 +2723,8 @@ handle_plaintext_channel_open (void *cls, | |||
2723 | if (NULL != ch) | 2723 | if (NULL != ch) |
2724 | { | 2724 | { |
2725 | LOG (GNUNET_ERROR_TYPE_DEBUG, | 2725 | LOG (GNUNET_ERROR_TYPE_DEBUG, |
2726 | "Received duplicate channel CHANNEL_OPEN on port %s from %s (%s), resending ACK\n", | 2726 | "Received duplicate channel CHANNEL_OPEN on h_port %s from %s (%s), resending ACK\n", |
2727 | GNUNET_h2s (&copen->port), | 2727 | GNUNET_h2s (&copen->h_port), |
2728 | GCT_2s (t), | 2728 | GCT_2s (t), |
2729 | GCCH_2s (ch)); | 2729 | GCCH_2s (ch)); |
2730 | GCCH_handle_duplicate_open (ch, | 2730 | GCCH_handle_duplicate_open (ch, |
@@ -2732,12 +2732,12 @@ handle_plaintext_channel_open (void *cls, | |||
2732 | return; | 2732 | return; |
2733 | } | 2733 | } |
2734 | LOG (GNUNET_ERROR_TYPE_DEBUG, | 2734 | LOG (GNUNET_ERROR_TYPE_DEBUG, |
2735 | "Received CHANNEL_OPEN on port %s from %s\n", | 2735 | "Received CHANNEL_OPEN on h_port %s from %s\n", |
2736 | GNUNET_h2s (&copen->port), | 2736 | GNUNET_h2s (&copen->h_port), |
2737 | GCT_2s (t)); | 2737 | GCT_2s (t)); |
2738 | ch = GCCH_channel_incoming_new (t, | 2738 | ch = GCCH_channel_incoming_new (t, |
2739 | copen->ctn, | 2739 | copen->ctn, |
2740 | &copen->port, | 2740 | &copen->h_port, |
2741 | ntohl (copen->opt)); | 2741 | ntohl (copen->opt)); |
2742 | if (NULL != t->destroy_task) | 2742 | if (NULL != t->destroy_task) |
2743 | { | 2743 | { |
@@ -2762,7 +2762,7 @@ void | |||
2762 | GCT_send_channel_destroy (struct CadetTunnel *t, | 2762 | GCT_send_channel_destroy (struct CadetTunnel *t, |
2763 | struct GNUNET_CADET_ChannelTunnelNumber ctn) | 2763 | struct GNUNET_CADET_ChannelTunnelNumber ctn) |
2764 | { | 2764 | { |
2765 | struct GNUNET_CADET_ChannelManageMessage msg; | 2765 | struct GNUNET_CADET_ChannelDestroyMessage msg; |
2766 | 2766 | ||
2767 | LOG (GNUNET_ERROR_TYPE_DEBUG, | 2767 | LOG (GNUNET_ERROR_TYPE_DEBUG, |
2768 | "Sending DESTORY message for channel ID %u\n", | 2768 | "Sending DESTORY message for channel ID %u\n", |
@@ -2788,7 +2788,7 @@ GCT_send_channel_destroy (struct CadetTunnel *t, | |||
2788 | */ | 2788 | */ |
2789 | static void | 2789 | static void |
2790 | handle_plaintext_channel_open_ack (void *cls, | 2790 | handle_plaintext_channel_open_ack (void *cls, |
2791 | const struct GNUNET_CADET_ChannelManageMessage *cm) | 2791 | const struct GNUNET_CADET_ChannelOpenAckMessage *cm) |
2792 | { | 2792 | { |
2793 | struct CadetTunnel *t = cls; | 2793 | struct CadetTunnel *t = cls; |
2794 | struct CadetChannel *ch; | 2794 | struct CadetChannel *ch; |
@@ -2811,7 +2811,8 @@ handle_plaintext_channel_open_ack (void *cls, | |||
2811 | GCCH_2s (ch), | 2811 | GCCH_2s (ch), |
2812 | GCT_2s (t)); | 2812 | GCT_2s (t)); |
2813 | GCCH_handle_channel_open_ack (ch, | 2813 | GCCH_handle_channel_open_ack (ch, |
2814 | GCC_get_id (t->current_ct->cc)); | 2814 | GCC_get_id (t->current_ct->cc), |
2815 | &cm->port); | ||
2815 | } | 2816 | } |
2816 | 2817 | ||
2817 | 2818 | ||
@@ -2824,7 +2825,7 @@ handle_plaintext_channel_open_ack (void *cls, | |||
2824 | */ | 2825 | */ |
2825 | static void | 2826 | static void |
2826 | handle_plaintext_channel_destroy (void *cls, | 2827 | handle_plaintext_channel_destroy (void *cls, |
2827 | const struct GNUNET_CADET_ChannelManageMessage *cm) | 2828 | const struct GNUNET_CADET_ChannelDestroyMessage *cm) |
2828 | { | 2829 | { |
2829 | struct CadetTunnel *t = cls; | 2830 | struct CadetTunnel *t = cls; |
2830 | struct CadetChannel *ch; | 2831 | struct CadetChannel *ch; |
@@ -2915,11 +2916,11 @@ GCT_create_tunnel (struct CadetPeer *destination) | |||
2915 | t), | 2916 | t), |
2916 | GNUNET_MQ_hd_fixed_size (plaintext_channel_open_ack, | 2917 | GNUNET_MQ_hd_fixed_size (plaintext_channel_open_ack, |
2917 | GNUNET_MESSAGE_TYPE_CADET_CHANNEL_OPEN_ACK, | 2918 | GNUNET_MESSAGE_TYPE_CADET_CHANNEL_OPEN_ACK, |
2918 | struct GNUNET_CADET_ChannelManageMessage, | 2919 | struct GNUNET_CADET_ChannelOpenAckMessage, |
2919 | t), | 2920 | t), |
2920 | GNUNET_MQ_hd_fixed_size (plaintext_channel_destroy, | 2921 | GNUNET_MQ_hd_fixed_size (plaintext_channel_destroy, |
2921 | GNUNET_MESSAGE_TYPE_CADET_CHANNEL_DESTROY, | 2922 | GNUNET_MESSAGE_TYPE_CADET_CHANNEL_DESTROY, |
2922 | struct GNUNET_CADET_ChannelManageMessage, | 2923 | struct GNUNET_CADET_ChannelDestroyMessage, |
2923 | t), | 2924 | t), |
2924 | GNUNET_MQ_handler_end () | 2925 | GNUNET_MQ_handler_end () |
2925 | }; | 2926 | }; |