summaryrefslogtreecommitdiffstats
path: root/src/task.c
diff options
context:
space:
mode:
authorMatthias Schiffer <mschiffer@universe-factory.net>2012-03-27 22:43:19 +0200
committerMatthias Schiffer <mschiffer@universe-factory.net>2012-03-27 22:43:19 +0200
commit3065f96f7b833701a03f5759bfc593a7f6943c4e (patch)
tree7413b460332130fc760f1c3a579a502e5e7454ea /src/task.c
parent2190d635c1bb7d917c16b543b78d74a4ca9a735d (diff)
downloadfastd-3065f96f7b833701a03f5759bfc593a7f6943c4e.tar
fastd-3065f96f7b833701a03f5759bfc593a7f6943c4e.zip
New handshake format; don't respond to data packets from unknown peers with handshakes, but request a re-handshake
Diffstat (limited to 'src/task.c')
-rw-r--r--src/task.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/task.c b/src/task.c
index 2726ced..472d491 100644
--- a/src/task.c
+++ b/src/task.c
@@ -61,11 +61,12 @@ void fastd_task_put_handle_recv(fastd_context *ctx, fastd_peer *peer, fastd_buff
fastd_queue_put(ctx, &ctx->task_queue, &task->entry, 0);
}
-void fastd_task_schedule_handshake(fastd_context *ctx, fastd_peer *peer, int timeout) {
+void fastd_task_schedule_handshake(fastd_context *ctx, fastd_peer *peer, int timeout, bool force) {
fastd_task *task = malloc(sizeof(fastd_task));
task->type = TASK_HANDSHAKE;
task->peer = peer;
+ task->handshake.force = force;
fastd_queue_put(ctx, &ctx->task_queue, &task->entry, timeout);
}