svn commit: r215718 - stable/8/usr.sbin/ppp
Nick Hibma
n_hibma at FreeBSD.org
Mon Nov 22 21:43:46 UTC 2010
Author: n_hibma
Date: Mon Nov 22 21:43:45 2010
New Revision: 215718
URL: http://svn.freebsd.org/changeset/base/215718
Log:
MFC -r212829: Bugfix: Reset the packet counters at the same time as the byte counts.
Modified:
stable/8/usr.sbin/ppp/throughput.c
Directory Properties:
stable/8/usr.sbin/ppp/ (props changed)
Modified: stable/8/usr.sbin/ppp/throughput.c
==============================================================================
--- stable/8/usr.sbin/ppp/throughput.c Mon Nov 22 21:39:35 2010 (r215717)
+++ stable/8/usr.sbin/ppp/throughput.c Mon Nov 22 21:43:45 2010 (r215718)
@@ -201,7 +201,7 @@ throughput_start(struct pppThroughput *t
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
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);
}
More information about the svn-src-stable
mailing list