From owner-svn-src-head@FreeBSD.ORG Sat Sep 18 22:26:50 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id A24D5106566B; Sat, 18 Sep 2010 22:26:50 +0000 (UTC) (envelope-from n_hibma@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 920988FC0A; Sat, 18 Sep 2010 22:26:50 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o8IMQoBq080058; Sat, 18 Sep 2010 22:26:50 GMT (envelope-from n_hibma@svn.freebsd.org) Received: (from n_hibma@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o8IMQofx080056; Sat, 18 Sep 2010 22:26:50 GMT (envelope-from n_hibma@svn.freebsd.org) Message-Id: <201009182226.o8IMQofx080056@svn.freebsd.org> From: Nick Hibma Date: Sat, 18 Sep 2010 22:26:50 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r212829 - head/usr.sbin/ppp X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 18 Sep 2010 22:26:50 -0000 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); }