Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 18 Sep 2010 22:26:50 +0000 (UTC)
From:      Nick Hibma <n_hibma@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r212829 - head/usr.sbin/ppp
Message-ID:  <201009182226.o8IMQofx080056@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: n_hibma
Date: Sat Sep 18 22:26:50 2010
New Revision: 212829
URL: http://svn.freebsd.org/changeset/base/212829

Log:
  Bugfix: Reset the packet counters at the same time as the byte counts.
  
  Reviewed by:	brian
  MFC after:	3 weeks

Modified:
  head/usr.sbin/ppp/throughput.c

Modified: head/usr.sbin/ppp/throughput.c
==============================================================================
--- head/usr.sbin/ppp/throughput.c	Sat Sep 18 20:50:36 2010	(r212828)
+++ head/usr.sbin/ppp/throughput.c	Sat Sep 18 22:26:50 2010	(r212829)
@@ -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);
   }



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201009182226.o8IMQofx080056>