summaryrefslogtreecommitdiffstats
path: root/etc/inc/shaper.inc
diff options
context:
space:
mode:
authorErmal <eri@pfsense.org>2010-10-25 18:06:05 +0000
committerErmal <eri@pfsense.org>2010-10-25 18:06:05 +0000
commit146f0fad466bbce33d2a3f05926686400ba504bf (patch)
tree41f603165420a545321c8bf3d98c6d66154c9e75 /etc/inc/shaper.inc
parent520ad1a4130ac764f78989673700359b14004604 (diff)
downloadpfsense-146f0fad466bbce33d2a3f05926686400ba504bf.zip
pfsense-146f0fad466bbce33d2a3f05926686400ba504bf.tar.gz
Do not show on the queue/limiters list the disabled entries(optimized and cleaner version).
Diffstat (limited to 'etc/inc/shaper.inc')
-rw-r--r--etc/inc/shaper.inc27
1 files changed, 12 insertions, 15 deletions
diff --git a/etc/inc/shaper.inc b/etc/inc/shaper.inc
index 486b27e..201534c 100644
--- a/etc/inc/shaper.inc
+++ b/etc/inc/shaper.inc
@@ -380,9 +380,6 @@ class altq_root_queue {
function &get_queue_list($q = null) {
$qlist = array();
- if ($this->GetEnabled() <> "")
- return array(); /* Queue is disabled */
-
$qlist[$this->GetQname()] = & $this;
if (is_array($this->queues)) {
foreach ($this->queues as $queue)
@@ -906,9 +903,6 @@ class priq_queue {
function &get_queue_list(&$qlist) {
- if ($this->GetEnabled() <> "")
- return array(); /* Queue is disabled */
-
$qlist[$this->GetQname()] = & $this;
if (is_array($this->subqueues)) {
foreach ($this->subqueues as $queue)
@@ -2829,9 +2823,6 @@ class dnpipe_class extends dummynet_class {
function &get_queue_list($q = null) {
$qlist = array();
- if ($this->GetEnabled() <> "")
- return $qlist; /* Queue is disabled */
-
$qlist[$this->GetQname()] = $this->GetNumber();
if (is_array($this->subqueues)) {
foreach ($this->subqueues as $queue)
@@ -3136,9 +3127,8 @@ class dnqueue_class extends dummynet_class {
}
function &get_queue_list(&$qlist) {
- if ($this->GetEnabled() <> "")
- return array();
-
+ if ($this->GetEnabled() == "")
+ return;
$qlist[$this->GetQname()] = "?" .$this->GetNumber();
}
@@ -3795,9 +3785,13 @@ function &get_unique_queue_list() {
$qlist = array();
if (is_array($altq_list_queues)) {
foreach ($altq_list_queues as $altq) {
+ if ($altq->GetEnabled())
+ continue;
$tmplist =& $altq->get_queue_list();
- foreach ($tmplist as $qname => $link)
- $qlist[$qname] = $link;
+ foreach ($tmplist as $qname => $link) {
+ if ($link->GetEnabled() <> "")
+ $qlist[$qname] = $link;
+ }
}
}
return $qlist;
@@ -3809,9 +3803,12 @@ function &get_unique_dnqueue_list() {
$qlist = array();
if (is_array($dummynet_pipe_list)) {
foreach ($dummynet_pipe_list as $dn) {
+ if ($dn->GetEnabled() == "")
+ continue;
$tmplist =& $dn->get_queue_list();
- foreach ($tmplist as $qname => $link)
+ foreach ($tmplist as $qname => $link) {
$qlist[$qname] = $link;
+ }
}
}
return $qlist;
OpenPOWER on IntegriCloud