aboutsummaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
Diffstat (limited to 'test')
-rw-r--r--test/.gitignore1
-rw-r--r--test/test_msgnet_c.c4
2 files changed, 5 insertions, 0 deletions
diff --git a/test/.gitignore b/test/.gitignore
index 57a2e9b..bbd91a2 100644
--- a/test/.gitignore
+++ b/test/.gitignore
@@ -6,3 +6,4 @@ test_p2p_stress
test_queue
bench_network
Makefile
+test_msgnet_c
diff --git a/test/test_msgnet_c.c b/test/test_msgnet_c.c
index b717c3a..b09e375 100644
--- a/test/test_msgnet_c.c
+++ b/test/test_msgnet_c.c
@@ -132,6 +132,7 @@ MyNet gen_mynet(const eventcontext_t *ec,
res.net = msgnetwork_new(ec, netconfig);
msgnetwork_config_free(netconfig);
res.name = name;
+ return res;
};
static eventcontext_t *ec;
@@ -154,6 +155,9 @@ int main() {
msgnetwork_reg_handler(bob.net, MSG_OPCODE_HELLO, on_receive_hello);
msgnetwork_reg_handler(bob.net, MSG_OPCODE_ACK, on_receive_ack);
+ msgnetwork_reg_conn_handler(alice.net, conn_handler);
+ msgnetwork_reg_conn_handler(bob.net, conn_handler);
+
/* start all threads */
msgnetwork_start(alice.net);
msgnetwork_start(bob.net);