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.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/fastd.h') diff --git a/src/fastd.h b/src/fastd.h index b2b7de7..3ebb44f 100644 --- a/src/fastd.h +++ b/src/fastd.h @@ -69,8 +69,8 @@ struct fastd_protocol { fastd_protocol_config_t* (*init)(fastd_context_t *ctx); void (*peer_configure)(fastd_context_t *ctx, fastd_peer_config_t *peer_conf); - void (*handshake_init)(fastd_context_t *ctx, const fastd_socket_t *sock, const fastd_peer_address_t *address, const fastd_peer_config_t *peer_conf); - void (*handshake_handle)(fastd_context_t *ctx, fastd_socket_t *sock, const fastd_peer_address_t *address, const fastd_peer_config_t *peer_conf, const fastd_handshake_t *handshake, const fastd_method_t *method); + void (*handshake_init)(fastd_context_t *ctx, const fastd_socket_t *sock, const fastd_peer_address_t *address, fastd_peer_t *peer); + void (*handshake_handle)(fastd_context_t *ctx, fastd_socket_t *sock, const fastd_peer_address_t *address, fastd_peer_t *peer, const fastd_handshake_t *handshake, const fastd_method_t *method); void (*handle_recv)(fastd_context_t *ctx, fastd_peer_t *peer, fastd_buffer_t buffer); void (*send)(fastd_context_t *ctx, fastd_peer_t *peer, fastd_buffer_t buffer); -- cgit v1.2.3