From 2c0f4a5abbc5663417d1390f658b387378e28978 Mon Sep 17 00:00:00 2001 From: Matthias Schiffer Date: Sat, 23 Feb 2013 14:28:33 +0100 Subject: Use fastd_peer_t instead of fastd_peer_config_t in handshake code Directly using the peers allows us to get rid of the inefficient get_peer() function and is necessary for adding support for unknown peers. --- src/fastd.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/fastd.c') diff --git a/src/fastd.c b/src/fastd.c index e48bb8a..704f383 100644 --- a/src/fastd.c +++ b/src/fastd.c @@ -683,7 +683,7 @@ static void send_handshake(fastd_context_t *ctx, fastd_peer_t *peer) { pr_debug(ctx, "sending handshake to %P...", peer); peer->last_handshake = ctx->now; peer->last_handshake_address = peer->address; - ctx->conf->protocol->handshake_init(ctx, peer->sock, &peer->address, peer->config); + ctx->conf->protocol->handshake_init(ctx, peer->sock, &peer->address, peer); } } @@ -818,7 +818,7 @@ static void handle_socket(fastd_context_t *ctx, fastd_socket_t *sock) { break; case PACKET_HANDSHAKE: - fastd_handshake_handle(ctx, sock, &recvaddr, peer->config, buffer); + fastd_handshake_handle(ctx, sock, &recvaddr, peer, buffer); break; default: -- cgit v1.2.3