summaryrefslogtreecommitdiffstats
path: root/src/task.c
diff options
context:
space:
mode:
authorMatthias Schiffer <mschiffer@universe-factory.net>2012-02-28 01:05:32 +0100
committerMatthias Schiffer <mschiffer@universe-factory.net>2012-02-28 01:05:32 +0100
commitac8a726ad658e35cf73d4a62646cbe5ba3e38da4 (patch)
tree51e034f82db30cd0572d188ae9a2611df18404f1 /src/task.c
parentc0f7708f4a36074817556d0966aeb54cc64a5b88 (diff)
downloadfastd-ac8a726ad658e35cf73d4a62646cbe5ba3e38da4.tar
fastd-ac8a726ad658e35cf73d4a62646cbe5ba3e38da4.zip
Make simple handshake work
Diffstat (limited to 'src/task.c')
-rw-r--r--src/task.c9
1 files changed, 9 insertions, 0 deletions
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);
+}