diff options
author | Matthias Schiffer <mschiffer@universe-factory.net> | 2014-09-12 16:31:18 +0200 |
---|---|---|
committer | Matthias Schiffer <mschiffer@universe-factory.net> | 2014-09-12 16:35:15 +0200 |
commit | d116950984d78392e1daf0adfd89f6cdb4fe8076 (patch) | |
tree | f5d12b55c556c511773704e6d2a879fcef85ffbb /src/send.c | |
parent | 3b18fc42b9fa23ed7db8d4e382dfc5f442eba05d (diff) | |
download | fastd-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.c | 8 |
1 files changed, 4 insertions, 4 deletions
@@ -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); |