summaryrefslogtreecommitdiffstats
path: root/usr.sbin/ppp/link.c
diff options
context:
space:
mode:
Diffstat (limited to 'usr.sbin/ppp/link.c')
-rw-r--r--usr.sbin/ppp/link.c16
1 files changed, 12 insertions, 4 deletions
diff --git a/usr.sbin/ppp/link.c b/usr.sbin/ppp/link.c
index e52c31b..7b81fd9 100644
--- a/usr.sbin/ppp/link.c
+++ b/usr.sbin/ppp/link.c
@@ -67,16 +67,24 @@
static void Despatch(struct bundle *, struct link *, struct mbuf *, u_short);
-void
+static inline void
link_AddInOctets(struct link *l, int n)
{
- throughput_addin(&l->throughput, n);
+ if (l->stats.gather) {
+ throughput_addin(&l->stats.total, n);
+ if (l->stats.parent)
+ throughput_addin(l->stats.parent, n);
+ }
}
-void
+static inline void
link_AddOutOctets(struct link *l, int n)
{
- throughput_addout(&l->throughput, n);
+ if (l->stats.gather) {
+ throughput_addout(&l->stats.total, n);
+ if (l->stats.parent)
+ throughput_addout(l->stats.parent, n);
+ }
}
void
OpenPOWER on IntegriCloud