From ac8a726ad658e35cf73d4a62646cbe5ba3e38da4 Mon Sep 17 00:00:00 2001 From: Matthias Schiffer Date: Tue, 28 Feb 2012 01:05:32 +0100 Subject: Make simple handshake work --- src/task.c | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'src/task.c') diff --git a/src/task.c b/src/task.c index 0367cb4..2de03b1 100644 --- a/src/task.c +++ b/src/task.c @@ -61,3 +61,12 @@ void fastd_task_put_handle_recv(fastd_context *ctx, const fastd_peer *peer, fast fastd_queue_put(&ctx->task_queue, task, 0); } + +void fastd_task_schedule_handshake(fastd_context *ctx, fastd_peer *peer, int timeout) { + fastd_task_handshake *task = malloc(sizeof(fastd_task_handshake)); + + task->type = TASK_HANDSHAKE; + task->peer = peer; + + fastd_queue_put(&ctx->task_queue, task, timeout); +} -- cgit v1.2.3