summaryrefslogtreecommitdiff
path: root/lib/Vyatta/Qos
diff options
context:
space:
mode:
authorStephen Hemminger <shemminger@vyatta.com>2009-04-13 11:30:37 -0700
committerStephen Hemminger <shemminger@vyatta.com>2009-04-13 11:30:37 -0700
commitedd48273398ba5bf16e9a3233df3429d53cdcc40 (patch)
tree9f9393b81ba2e5fd00b25bad03772a3be0646dc8 /lib/Vyatta/Qos
parent8f90c19d1e162d5e393e958a534501c002254c01 (diff)
downloadvyatta-cfg-qos-edd48273398ba5bf16e9a3233df3429d53cdcc40.tar.gz
vyatta-cfg-qos-edd48273398ba5bf16e9a3233df3429d53cdcc40.zip
Allow constructor with out configuration
Useful for creating default class without configuration.
Diffstat (limited to 'lib/Vyatta/Qos')
-rw-r--r--lib/Vyatta/Qos/ShaperClass.pm4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/Vyatta/Qos/ShaperClass.pm b/lib/Vyatta/Qos/ShaperClass.pm
index aa3a8ff..9a0ba00 100644
--- a/lib/Vyatta/Qos/ShaperClass.pm
+++ b/lib/Vyatta/Qos/ShaperClass.pm
@@ -43,7 +43,7 @@ sub new {
$self->{id} = $id;
bless $self, $class;
- $self->_define($config);
+ $self->_define($config) if ($config);
return $self;
}
@@ -135,7 +135,7 @@ sub prioQdisc {
if ($limit) {
foreach my $i (qw/1 2 3/) {
- printf "qdisc add dev %s parent %x:%d pfifo limit %d\n",
+ printf "qdisc add dev %s parent %x:%x pfifo limit %d\n",
$dev, $prio_id, $i, $limit;
}
}