summaryrefslogtreecommitdiffstats
path: root/src/send.c
diff options
context:
space:
mode:
authorMatthias Schiffer <mschiffer@universe-factory.net>2014-09-12 16:31:18 +0200
committerMatthias Schiffer <mschiffer@universe-factory.net>2014-09-12 16:35:15 +0200
commitd116950984d78392e1daf0adfd89f6cdb4fe8076 (patch)
treef5d12b55c556c511773704e6d2a879fcef85ffbb /src/send.c
parent3b18fc42b9fa23ed7db8d4e382dfc5f442eba05d (diff)
downloadfastd-d116950984d78392e1daf0adfd89f6cdb4fe8076.tar
fastd-d116950984d78392e1daf0adfd89f6cdb4fe8076.zip
Restructure traffics stats to keep all stats in a single structure
Diffstat (limited to 'src/send.c')
-rw-r--r--src/send.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/send.c b/src/send.c
index 4028c55..fbc1a16 100644
--- a/src/send.c
+++ b/src/send.c
@@ -143,23 +143,23 @@ static void send_type(const fastd_socket_t *sock, const fastd_peer_address_t *lo
case EWOULDBLOCK:
#endif
pr_debug2_errno("sendmsg");
- fastd_stats_add(&ctx.tx_dropped, stat_size);
+ fastd_stats_add(peer, STAT_TX_DROPPED, stat_size);
break;
case ENETDOWN:
case ENETUNREACH:
case EHOSTUNREACH:
pr_debug_errno("sendmsg");
- fastd_stats_add(&ctx.tx_error, stat_size);
+ fastd_stats_add(peer, STAT_TX_ERROR, stat_size);
break;
default:
pr_warn_errno("sendmsg");
- fastd_stats_add(&ctx.tx_error, stat_size);
+ fastd_stats_add(peer, STAT_TX_ERROR, stat_size);
}
}
else {
- fastd_stats_add(&ctx.tx, stat_size);
+ fastd_stats_add(peer, STAT_TX, stat_size);
}
fastd_buffer_free(buffer);