diff options
author | Matthias Schiffer <mschiffer@universe-factory.net> | 2012-02-28 01:05:32 +0100 |
---|---|---|
committer | Matthias Schiffer <mschiffer@universe-factory.net> | 2012-02-28 01:05:32 +0100 |
commit | ac8a726ad658e35cf73d4a62646cbe5ba3e38da4 (patch) | |
tree | 51e034f82db30cd0572d188ae9a2611df18404f1 /src/task.c | |
parent | c0f7708f4a36074817556d0966aeb54cc64a5b88 (diff) | |
download | fastd-ac8a726ad658e35cf73d4a62646cbe5ba3e38da4.tar fastd-ac8a726ad658e35cf73d4a62646cbe5ba3e38da4.zip |
Make simple handshake work
Diffstat (limited to 'src/task.c')
-rw-r--r-- | src/task.c | 9 |
1 files changed, 9 insertions, 0 deletions
@@ -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); +} |