remove bug with @ in check_centreon_traffic

git-svn-id: http://svn.centreon.com/trunk/plugins-2.x@6169 6bcd3966-0018-0410-8128-fd23d134de7e
This commit is contained in:
Julien Mathis 2008-08-14 14:38:23 +00:00
parent 1765f67c3c
commit 52c1657402
1 changed files with 2 additions and 0 deletions

View File

@ -203,6 +203,7 @@ if ($opt_n) {
exit $ERRORS{'UNKNOWN'}; exit $ERRORS{'UNKNOWN'};
} }
foreach my $key ( oid_lex_sort(keys %$result)) { foreach my $key ( oid_lex_sort(keys %$result)) {
$result->{$key} =~ s/\x00//g; //Added line to strip the illegal character off.
if ($result->{$key} =~ m/$opt_i/) { if ($result->{$key} =~ m/$opt_i/) {
my @oid_list = split (/\./,$key); my @oid_list = split (/\./,$key);
$interface = pop (@oid_list) ; $interface = pop (@oid_list) ;
@ -216,6 +217,7 @@ if ($opt_n) {
exit $ERRORS{'UNKNOWN'}; exit $ERRORS{'UNKNOWN'};
} }
foreach my $key ( oid_lex_sort(keys %$result)) { foreach my $key ( oid_lex_sort(keys %$result)) {
$result->{$key} =~ s/\x00//g; //Added line to strip the illegal character off.
if ($result->{$key} eq $opt_i) { if ($result->{$key} eq $opt_i) {
my @oid_list = split (/\./,$key); my @oid_list = split (/\./,$key);
$interface = pop (@oid_list) ; $interface = pop (@oid_list) ;