diff options
author | Matthias Schiffer <mschiffer@universe-factory.net> | 2012-02-29 22:44:40 +0100 |
---|---|---|
committer | Matthias Schiffer <mschiffer@universe-factory.net> | 2012-02-29 22:44:40 +0100 |
commit | 0f2e170ea6edee4df0f90a3821d5c054db6bd6b7 (patch) | |
tree | 6d90aea5c094eec471e6aa2f25f9f080741d1320 /src/task.c | |
parent | b5892c34186707a50b2afb713e13cbfc3e859920 (diff) | |
download | fastd-0f2e170ea6edee4df0f90a3821d5c054db6bd6b7.tar fastd-0f2e170ea6edee4df0f90a3821d5c054db6bd6b7.zip |
Only send packets to the right host in ethernet mode
Diffstat (limited to 'src/task.c')
-rw-r--r-- | src/task.c | 8 |
1 files changed, 4 insertions, 4 deletions
@@ -33,7 +33,7 @@ fastd_task* fastd_task_get(fastd_context *ctx) { return fastd_queue_get(&ctx->task_queue); } -static void fastd_task_put_send_type(fastd_context *ctx, const fastd_peer *peer, uint8_t packet_type, fastd_buffer buffer) { +static void fastd_task_put_send_type(fastd_context *ctx, fastd_peer *peer, uint8_t packet_type, fastd_buffer buffer) { fastd_task_send *task = malloc(sizeof(fastd_task_send)); task->type = TASK_SEND; @@ -44,15 +44,15 @@ static void fastd_task_put_send_type(fastd_context *ctx, const fastd_peer *peer, fastd_queue_put(&ctx->task_queue, task, 0); } -void fastd_task_put_send_handshake(fastd_context *ctx, const fastd_peer *peer, fastd_buffer buffer) { +void fastd_task_put_send_handshake(fastd_context *ctx, fastd_peer *peer, fastd_buffer buffer) { fastd_task_put_send_type(ctx, peer, 1, buffer); } -void fastd_task_put_send(fastd_context *ctx, const fastd_peer *peer, fastd_buffer buffer) { +void fastd_task_put_send(fastd_context *ctx, fastd_peer *peer, fastd_buffer buffer) { fastd_task_put_send_type(ctx, peer, 0, buffer); } -void fastd_task_put_handle_recv(fastd_context *ctx, const fastd_peer *peer, fastd_buffer buffer) { +void fastd_task_put_handle_recv(fastd_context *ctx, fastd_peer *peer, fastd_buffer buffer) { fastd_task_handle_recv *task = malloc(sizeof(fastd_task_handle_recv)); task->type = TASK_HANDLE_RECV; |