summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorsthen <sthen@openbsd.org>2014-04-26 11:27:23 +0000
committersthen <sthen@openbsd.org>2014-04-26 11:27:23 +0000
commit70746cb8991640227491a0e7e63942747ab77c4c (patch)
tree153671d3edcc088b0b3f556c0e077bc4d9f44a6d
parentThis is not FreeBSD. (diff)
downloadwireguard-openbsd-70746cb8991640227491a0e7e63942747ab77c4c.tar.xz
wireguard-openbsd-70746cb8991640227491a0e7e63942747ab77c4c.zip
Only remove queues from the TAILQ when the ticket changes; fixes PPS/BPS
displays for queues in "systat q". From Arto Jonsson.
-rw-r--r--usr.bin/systat/pftop.c8
1 files changed, 2 insertions, 6 deletions
diff --git a/usr.bin/systat/pftop.c b/usr.bin/systat/pftop.c
index c57882d5b94..fc4a6569d58 100644
--- a/usr.bin/systat/pftop.c
+++ b/usr.bin/systat/pftop.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: pftop.c,v 1.24 2014/04/18 11:36:06 henning Exp $ */
+/* $OpenBSD: pftop.c,v 1.25 2014/04/26 11:27:23 sthen Exp $ */
/*
* Copyright (c) 2001, 2007 Can Erkin Acar
* Copyright (c) 2001 Daniel Hartmeier
@@ -1588,14 +1588,10 @@ read_queues(void)
int inserts;
num_disp = num_queues = 0;
- while ((node = TAILQ_FIRST(&qnodes)) != NULL) {
- TAILQ_REMOVE(&qnodes, node, entries);
- free(node);
- }
if (pfctl_update_qstats() < 0)
return (-1);
num_disp = num_queues;
-
+
return(0);
}