diff options
author | Stephen Hemminger <stephen.hemminger@vyatta.com> | 2009-03-17 10:38:08 -0700 |
---|---|---|
committer | Stephen Hemminger <stephen.hemminger@vyatta.com> | 2009-03-17 10:38:08 -0700 |
commit | c667c9b128af7a9d8344459c8c65ee9ee8703f02 (patch) | |
tree | 7d81e69553460d081b899016bcc6b0c9e395baa5 /lib/Vyatta/Qos/TrafficLimiter.pm | |
parent | 426d6086ebecea13fe29721130f071284ebca899 (diff) | |
download | vyatta-cfg-qos-c667c9b128af7a9d8344459c8c65ee9ee8703f02.tar.gz vyatta-cfg-qos-c667c9b128af7a9d8344459c8c65ee9ee8703f02.zip |
Use select to avoid passing output path around
Easier to just use 'select' in perl to avoid passing file
descriptor everywhere.
Diffstat (limited to 'lib/Vyatta/Qos/TrafficLimiter.pm')
-rw-r--r-- | lib/Vyatta/Qos/TrafficLimiter.pm | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/lib/Vyatta/Qos/TrafficLimiter.pm b/lib/Vyatta/Qos/TrafficLimiter.pm index 5aea0f9..fd3460c 100644 --- a/lib/Vyatta/Qos/TrafficLimiter.pm +++ b/lib/Vyatta/Qos/TrafficLimiter.pm @@ -76,15 +76,15 @@ sub _define { } sub commands { - my ( $self, $out, $dev ) = @_; + my ( $self, $dev ) = @_; my $classes = $self->{_classes}; my $parent = 0xffff; - printf {$out} "qdisc add dev %s handle %x: ingress\n", $dev, $parent; + printf "qdisc add dev %s handle %x: ingress\n", $dev, $parent; foreach my $class (@$classes) { foreach my $match ( $class->matchRules() ) { - $match->filter( $out, $dev, $parent, $class->{priority} ); - printf {$out} " police rate %s burst %s drop flowid :%x\n", + $match->filter( $dev, $parent, $class->{priority} ); + printf " police rate %s burst %s drop flowid :%x\n", $class->{rate}, $class->{burst}, $class->{id}; } } |