From a970ad152fbc76fe3b641c02840c5a58348efbd6 Mon Sep 17 00:00:00 2001 From: Christian Grothoff Date: Mon, 23 Jan 2017 14:31:40 +0100 Subject: [PATCH] add sender argument to GCCH_handle_local_data so we can implement loopback --- src/cadet/gnunet-service-cadet-new.c | 1 + src/cadet/gnunet-service-cadet-new_channel.c | 2 ++ src/cadet/gnunet-service-cadet-new_channel.h | 2 ++ 3 files changed, 5 insertions(+) diff --git a/src/cadet/gnunet-service-cadet-new.c b/src/cadet/gnunet-service-cadet-new.c index c9a2fb437..ef0870158 100644 --- a/src/cadet/gnunet-service-cadet-new.c +++ b/src/cadet/gnunet-service-cadet-new.c @@ -715,6 +715,7 @@ handle_data (void *cls, GCCH_2s (ch)); if (GNUNET_OK != GCCH_handle_local_data (ch, + c, buf, payload_size)) { diff --git a/src/cadet/gnunet-service-cadet-new_channel.c b/src/cadet/gnunet-service-cadet-new_channel.c index e7a13157b..3d52c67af 100644 --- a/src/cadet/gnunet-service-cadet-new_channel.c +++ b/src/cadet/gnunet-service-cadet-new_channel.c @@ -1327,6 +1327,7 @@ data_sent_cb (void *cls) * buffer space in the tunnel. * * @param ch Channel. + * @param sender client sending the data * @param buf payload to transmit. * @param buf_len number of bytes in @a buf * @return #GNUNET_OK if everything goes well, @@ -1334,6 +1335,7 @@ data_sent_cb (void *cls) */ int GCCH_handle_local_data (struct CadetChannel *ch, + struct CadetClient *sender, const char *buf, size_t buf_len) { diff --git a/src/cadet/gnunet-service-cadet-new_channel.h b/src/cadet/gnunet-service-cadet-new_channel.h index a473fd3e4..99124f651 100644 --- a/src/cadet/gnunet-service-cadet-new_channel.h +++ b/src/cadet/gnunet-service-cadet-new_channel.h @@ -220,6 +220,7 @@ GCCH_handle_remote_destroy (struct CadetChannel *ch); * buffer space in the tunnel. * * @param ch Channel. + * @param sender client sending the data * @param buf payload to transmit. * @param buf_len number of bytes in @a buf * @return #GNUNET_OK if everything goes well, @@ -227,6 +228,7 @@ GCCH_handle_remote_destroy (struct CadetChannel *ch); */ int GCCH_handle_local_data (struct CadetChannel *ch, + struct CadetClient *sender, const char *buf, size_t buf_len); -- 2.25.1