Projet

Général

Profil

Révision 0553d6c2

ID0553d6c2d02be2e98a62fe8dc7874cce203ce4d2
Parent 381101d2
Enfant 999f4347

Ajouté par Samuel Smith il y a presque 10 ans

Fix undef string compare.

Guard against $type not defined.

Voir les différences:

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