From d9ed50094da3890b10872a4955dceb2817931f1f Mon Sep 17 00:00:00 2001 From: Matthias Schiffer Date: Wed, 14 Mar 2012 17:16:28 +0100 Subject: Require libuecc; rename cfxp to ecfxp; add some basic infrastructure for crypto implementation --- src/method_null.c | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'src/method_null.c') diff --git a/src/method_null.c b/src/method_null.c index e8d8f58..f5a0d74 100644 --- a/src/method_null.c +++ b/src/method_null.c @@ -81,11 +81,15 @@ static char* method_peer_str(const fastd_context *ctx, const fastd_peer *peer) { } static void method_init(fastd_context *ctx, fastd_peer *peer) { + pr_info(ctx, "Connection with %P established.", peer); + fastd_task_put_send(ctx, peer, fastd_buffer_alloc(0, 0, 0)); } static void method_handle_recv(fastd_context *ctx, fastd_peer *peer, fastd_buffer buffer) { if (!fastd_peer_is_established(peer)) { + pr_info(ctx, "Connection with %P established.", peer); + fastd_peer_set_established(ctx, peer); } @@ -114,6 +118,9 @@ static void method_send(fastd_context *ctx, fastd_peer *peer, fastd_buffer buffe fastd_task_put_send(ctx, peer, buffer); } +static void method_free_peer_private(fastd_context *ctx, fastd_peer *peer) { +} + const fastd_method fastd_method_null = { .name = "null", @@ -127,4 +134,6 @@ const fastd_method fastd_method_null = { .init = method_init, .handle_recv = method_handle_recv, .send = method_send, + + .free_peer_private = method_free_peer_private, }; -- cgit v1.2.3