diff options
author | n_hibma <n_hibma@FreeBSD.org> | 2010-09-18 22:26:50 +0000 |
---|---|---|
committer | n_hibma <n_hibma@FreeBSD.org> | 2010-09-18 22:26:50 +0000 |
commit | 1d31aa9c66f942567591255adfa020deb014f7ba (patch) | |
tree | db76dd300848908e38ab156fc1bbe5b48ea8ef4f /usr.sbin/ppp | |
parent | 6b7ae726441a9133794fcc89fcb2a2ba76733653 (diff) | |
download | FreeBSD-src-1d31aa9c66f942567591255adfa020deb014f7ba.zip FreeBSD-src-1d31aa9c66f942567591255adfa020deb014f7ba.tar.gz |
Bugfix: Reset the packet counters at the same time as the byte counts.
Reviewed by: brian
MFC after: 3 weeks
Diffstat (limited to 'usr.sbin/ppp')
-rw-r--r-- | usr.sbin/ppp/throughput.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/usr.sbin/ppp/throughput.c b/usr.sbin/ppp/throughput.c index f6bc9b5..7ecba8c 100644 --- a/usr.sbin/ppp/throughput.c +++ b/usr.sbin/ppp/throughput.c @@ -201,7 +201,7 @@ throughput_start(struct pppThroughput *t, const char *name, int rolling) for (i = 0; i < t->SamplePeriod; i++) t->in.SampleOctets[i] = t->out.SampleOctets[i] = 0; t->nSample = 0; - t->OctetsIn = t->OctetsOut = 0; + t->OctetsIn = t->OctetsOut = t->PacketsIn = t->PacketsOut = 0; t->in.OctetsPerSecond = t->out.OctetsPerSecond = t->BestOctetsPerSecond = 0; time(&t->BestOctetsPerSecondTime); t->downtime = 0; @@ -268,7 +268,7 @@ throughput_clear(struct pppThroughput *t, int clear_type, struct prompt *prompt) divisor = 1; prompt_Printf(prompt, "overall cleared (was %6qu bytes/sec)\n", (t->OctetsIn + t->OctetsOut) / divisor); - t->OctetsIn = t->OctetsOut = 0; + t->OctetsIn = t->OctetsOut = t->PacketsIn = t->PacketsOut = 0; t->downtime = 0; time(&t->uptime); } |