summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorxrs <xrs@mail36.net>2020-03-18 21:17:43 +0100
committerxrs <xrs@mail36.net>2020-06-19 22:51:19 +0200
commit861de156af56ed4ec8c6065c5ab36a0a3ee742b4 (patch)
treeca4867b89c42a5d76f8d208424b7d680cf2284e0
parent610531a5bdc6d2b687266b4cab829d74dbaf9c6a (diff)
send a message from A to B
-rw-r--r--src/cadet/test_cadeT.c6
-rw-r--r--src/cadet/test_cadeT_util.c9
-rw-r--r--src/cadet/test_cadeT_util.h2
3 files changed, 16 insertions, 1 deletions
diff --git a/src/cadet/test_cadeT.c b/src/cadet/test_cadeT.c
index 0100224d6..1f1d3831e 100644
--- a/src/cadet/test_cadeT.c
+++ b/src/cadet/test_cadeT.c
@@ -124,6 +124,12 @@ set_data_loss_rate (int rate)
GNUNET_log (GNUNET_ERROR_TYPE_INFO, "%s: %i loss.\n", __func__, rate);
}
+void
+handle_message ()
+{
+ GNUNET_log (GNUNET_ERROR_TYPE_INFO, "%s\n", __func__);
+}
+
static void
send_message ()
{
diff --git a/src/cadet/test_cadeT_util.c b/src/cadet/test_cadeT_util.c
index bf65aca32..7f28678b9 100644
--- a/src/cadet/test_cadeT_util.c
+++ b/src/cadet/test_cadeT_util.c
@@ -102,6 +102,13 @@ setup_initiating_peer (void *cls,
{
struct GNUNET_CADET_Handle *cadet;
struct GNUNET_CADET_Channel *channel;
+ struct GNUNET_MQ_MessageHandler msg_handlers[] = {
+ GNUNET_MQ_hd_fixed_size (message,
+ GNUNET_MESSAGE_TYPE_DUMMY,
+ struct GNUNET_MessageHeader,
+ NULL),
+ GNUNET_MQ_handler_end ()
+ };
GNUNET_log (GNUNET_ERROR_TYPE_INFO, "%s\n", __func__);
@@ -117,7 +124,7 @@ setup_initiating_peer (void *cls,
&hashed_portname,
NULL,
&disconnect_channel,
- NULL);
+ msg_handlers);
test_peers[0].channel = channel;
return cadet;
diff --git a/src/cadet/test_cadeT_util.h b/src/cadet/test_cadeT_util.h
index b93804613..e12732d14 100644
--- a/src/cadet/test_cadeT_util.h
+++ b/src/cadet/test_cadeT_util.h
@@ -47,6 +47,8 @@ int
check_message (void *cls,
const struct GNUNET_MessageHeader *message);
+void handle_message ();
+
/**
* Structure for storing information of testbed peers.
*/