diff options
author | Stuart Henderson <sthen@cvs.openbsd.org> | 2014-04-26 11:27:24 +0000 |
---|---|---|
committer | Stuart Henderson <sthen@cvs.openbsd.org> | 2014-04-26 11:27:24 +0000 |
commit | 9c3d54a887f61fb2e1e7b16f8064d39bb3e073c0 (patch) | |
tree | 0ceb3d8a0a2bc99119b77cc2716ad86c5fc9eb4c | |
parent | d04e12bc8090cdf8d70263faad44d7d5f1ff6f40 (diff) |
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.c | 8 |
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); } |