Révision 0553d6c2
Fix undef string compare.
Guard against $type not defined.
| plugins/network/qos_ | ||
|---|---|---|
| 81 | 81 |
for( my $x = 0; $x < scalar(@class); $x++ ) {
|
| 82 | 82 |
if($class[$x] =~ m/^class/i ) {
|
| 83 | 83 |
( $name, $id1, $id2, $type, $parent) = ( $class[$x] =~ m/^class\s+(\w+)\s+(\d+):(\d+)\s+(\w+)\s([^\s]+)/i ); |
| 84 |
if($type eq "parent") {
|
|
| 84 |
if($type && $type eq "parent") {
|
|
| 85 | 85 |
$x++; |
| 86 | 86 |
( $rate ) = ( $class[$x] =~ m/Sent\s+(\d+)\s+/i ); |
| 87 | 87 |
$handle = "$name"."${id1}_${id2}";
|
| ... | ... | |
| 168 | 168 |
print $queues{$key}->{queue},$queues{$key}->{handle}, ".value ",$queues{$key}->{sent}, "\n";
|
| 169 | 169 |
} |
| 170 | 170 |
# |
| 171 |
# vim:syntax=perl |
|
| 171 |
# vim:syntax=perl |
|
Formats disponibles : Unified diff