diff options
author | Matthias Schiffer <mschiffer@universe-factory.net> | 2012-02-28 22:40:53 +0100 |
---|---|---|
committer | Matthias Schiffer <mschiffer@universe-factory.net> | 2012-02-28 22:40:53 +0100 |
commit | 6390442c477b603d87680f8b415c1ec0dfaa9ebf (patch) | |
tree | c5f6c6a5415add9548ad0c17ce051bcaa3b8eb15 /src/handshake.c | |
parent | 35742ca05a8826541207faaa9584708da5485d95 (diff) | |
download | fastd-6390442c477b603d87680f8b415c1ec0dfaa9ebf.tar fastd-6390442c477b603d87680f8b415c1ec0dfaa9ebf.zip |
Rework buffer structure
Diffstat (limited to 'src/handshake.c')
-rw-r--r-- | src/handshake.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/handshake.c b/src/handshake.c index 350dc5e..59ebd72 100644 --- a/src/handshake.c +++ b/src/handshake.c @@ -35,8 +35,8 @@ void fastd_handshake_send(fastd_context *ctx, fastd_peer *peer) { size_t method_len = strlen(ctx->conf->method->name); size_t len = sizeof(fastd_packet_request)+method_len; - fastd_buffer buffer = fastd_buffer_alloc(len, 0); - fastd_packet_request *request = buffer.base; + fastd_buffer buffer = fastd_buffer_alloc(len, 0, 0); + fastd_packet_request *request = buffer.data; request->reply = 0; request->cp = 0; @@ -73,8 +73,8 @@ void fastd_handshake_handle(fastd_context *ctx, fastd_peer *peer, fastd_buffer b strncmp(packet->request.method_name, ctx->conf->method->name, packet->request.method_len)) goto end_free; // TODO - fastd_buffer reply_buffer = fastd_buffer_alloc(sizeof(fastd_packet_reply), 0); - fastd_packet_reply *reply = reply_buffer.base; + fastd_buffer reply_buffer = fastd_buffer_alloc(sizeof(fastd_packet_reply), 0, 0); + fastd_packet_reply *reply = reply_buffer.data; reply->reply = 1; reply->cp = 0; |