summaryrefslogtreecommitdiffstats
path: root/src/protocol_ec25519_fhmqvc.c
diff options
context:
space:
mode:
authorMatthias Schiffer <mschiffer@universe-factory.net>2013-08-29 11:53:34 +0200
committerMatthias Schiffer <mschiffer@universe-factory.net>2013-08-29 11:53:34 +0200
commit620f1cd45f44eb2dc2d9dd16bdf6ba4512a1bd69 (patch)
treeb499f013579302ee0c57538a8879d56c86dd756c /src/protocol_ec25519_fhmqvc.c
parentdcaf41a18e1bd9014d1cf3ca7a7129a1be76e811 (diff)
downloadfastd-620f1cd45f44eb2dc2d9dd16bdf6ba4512a1bd69.tar
fastd-620f1cd45f44eb2dc2d9dd16bdf6ba4512a1bd69.zip
Replace old task queue
The handshakes are now schedules in a doubly-linked list that is maintained as a part of the peer structure.
Diffstat (limited to 'src/protocol_ec25519_fhmqvc.c')
-rw-r--r--src/protocol_ec25519_fhmqvc.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/src/protocol_ec25519_fhmqvc.c b/src/protocol_ec25519_fhmqvc.c
index d1d4740..bb75404 100644
--- a/src/protocol_ec25519_fhmqvc.c
+++ b/src/protocol_ec25519_fhmqvc.c
@@ -28,7 +28,6 @@
#include "handshake.h"
#include "peer.h"
#include "sha256.h"
-#include "task.h"
#include <libuecc/ecc.h>
@@ -149,7 +148,7 @@ static inline void check_session_refresh(fastd_context_t *ctx, fastd_peer_t *pee
pr_verbose(ctx, "refreshing session with %P", peer);
session->handshakes_cleaned = true;
session->refreshing = true;
- fastd_task_schedule_handshake(ctx, peer, 0);
+ fastd_peer_schedule_handshake(ctx, peer, 0);
}
}
@@ -436,7 +435,7 @@ static bool establish(fastd_context_t *ctx, fastd_peer_t *peer, const fastd_meth
pr_verbose(ctx, "new session with %P established using method `%s'.", peer, method->name);
if (initiator)
- fastd_peer_schedule_handshake(ctx, peer);
+ fastd_peer_schedule_handshake_default(ctx, peer);
else
send_empty(ctx, peer, &peer->protocol_state->session);
@@ -793,7 +792,7 @@ static void protocol_handle_recv(fastd_context_t *ctx, fastd_peer_t *peer, fastd
if (!peer->protocol_state->session.handshakes_cleaned) {
pr_debug(ctx, "cleaning left handshakes with %P", peer);
- fastd_task_delete_peer(ctx, peer);
+ fastd_peer_unschedule_handshake(ctx, peer);
peer->protocol_state->session.handshakes_cleaned = true;
if (peer->protocol_state->session.method->session_is_initiator(ctx, peer->protocol_state->session.method_state))