Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 22 Nov 2010 21:43:46 +0000 (UTC)
From:      Nick Hibma <n_hibma@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org
Subject:   svn commit: r215718 - stable/8/usr.sbin/ppp
Message-ID:  <201011222143.oAMLhkEJ006997@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
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);
   }



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