summaryrefslogtreecommitdiffstats
path: root/src/protocol_ec25519_fhmqvc.c
diff options
context:
space:
mode:
authorMatthias Schiffer <mschiffer@universe-factory.net>2013-09-03 21:53:45 +0200
committerMatthias Schiffer <mschiffer@universe-factory.net>2013-09-03 21:53:45 +0200
commit02c1cb4ce21dca6cc63545cd5bd7ed621ed61529 (patch)
tree7c953fbb9c062936b66f63a8d95b5702da7ece8e /src/protocol_ec25519_fhmqvc.c
parentf0fa4e0c9085e0b4476b144185040ce9fbdc11e3 (diff)
downloadfastd-02c1cb4ce21dca6cc63545cd5bd7ed621ed61529.tar
fastd-02c1cb4ce21dca6cc63545cd5bd7ed621ed61529.zip
Add packet/byte statistics
Diffstat (limited to 'src/protocol_ec25519_fhmqvc.c')
-rw-r--r--src/protocol_ec25519_fhmqvc.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/protocol_ec25519_fhmqvc.c b/src/protocol_ec25519_fhmqvc.c
index 73fbc5e..62e9303 100644
--- a/src/protocol_ec25519_fhmqvc.c
+++ b/src/protocol_ec25519_fhmqvc.c
@@ -826,13 +826,15 @@ static void protocol_handle_recv(fastd_context_t *ctx, fastd_peer_t *peer, fastd
}
static void session_send(fastd_context_t *ctx, fastd_peer_t *peer, fastd_buffer_t buffer, protocol_session_t *session) {
+ size_t stat_size = buffer.len;
+
fastd_buffer_t send_buffer;
if (!session->method->encrypt(ctx, peer, session->method_state, &send_buffer, buffer)) {
fastd_buffer_free(buffer);
return;
}
- fastd_send(ctx, peer->sock, &peer->local_address, &peer->address, send_buffer);
+ fastd_send(ctx, peer->sock, &peer->local_address, &peer->address, send_buffer, stat_size);
peer->last_send = ctx->now;
}