summaryrefslogtreecommitdiffstats
path: root/src/handshake.c
diff options
context:
space:
mode:
authorMatthias Schiffer <mschiffer@universe-factory.net>2012-10-29 22:21:47 +0100
committerMatthias Schiffer <mschiffer@universe-factory.net>2012-10-29 22:21:47 +0100
commit078b835209bd22b5cf3f497f2b06f3fad0a078ca (patch)
tree2704129741073ce83345cc3305fbf51a988d2842 /src/handshake.c
parentf5462bd63a1f6fc8879341c3eacd60e9824dec24 (diff)
downloadfastd-078b835209bd22b5cf3f497f2b06f3fad0a078ca.tar
fastd-078b835209bd22b5cf3f497f2b06f3fad0a078ca.zip
Add support for multiple binds
Diffstat (limited to 'src/handshake.c')
-rw-r--r--src/handshake.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/handshake.c b/src/handshake.c
index f2bdb4c..e823a0e 100644
--- a/src/handshake.c
+++ b/src/handshake.c
@@ -180,7 +180,7 @@ static fastd_string_stack* parse_string_list(uint8_t *data, size_t len) {
return ret;
}
-void fastd_handshake_handle(fastd_context *ctx, const fastd_peer_address *address, const fastd_peer_config *peer_conf, fastd_buffer buffer) {
+void fastd_handshake_handle(fastd_context *ctx, const fastd_socket *sock, const fastd_peer_address *address, const fastd_peer_config *peer_conf, fastd_buffer buffer) {
if (buffer.len < sizeof(fastd_packet)) {
pr_warn(ctx, "received a short handshake from %I", address);
goto end_free;
@@ -304,10 +304,10 @@ void fastd_handshake_handle(fastd_context *ctx, const fastd_peer_address *addres
fastd_handshake_add_uint8(ctx, &reply_buffer, RECORD_REPLY_CODE, reply_code);
fastd_handshake_add_uint8(ctx, &reply_buffer, RECORD_ERROR_DETAIL, error_detail);
- fastd_send_handshake(ctx, address, reply_buffer);
+ fastd_send_handshake(ctx, sock, address, reply_buffer);
}
else {
- ctx->conf->protocol->handshake_handle(ctx, address, peer_conf, &handshake, method);
+ ctx->conf->protocol->handshake_handle(ctx, sock, address, peer_conf, &handshake, method);
}
}
else {
@@ -334,7 +334,7 @@ void fastd_handshake_handle(fastd_context *ctx, const fastd_peer_address *addres
goto end_free;
}
- ctx->conf->protocol->handshake_handle(ctx, address, peer_conf, &handshake, method);
+ ctx->conf->protocol->handshake_handle(ctx, sock, address, peer_conf, &handshake, method);
}
else {
const char *error_field_str;