mirror of
https://github.com/centreon/centreon-plugins.git
synced 2025-07-27 07:34:35 +02:00
fix printer errror status
This commit is contained in:
parent
be84ac27b1
commit
49e295a722
@ -124,11 +124,6 @@ sub manage_selection {
|
|||||||
my $value = unpack('S', $result->{$_});
|
my $value = unpack('S', $result->{$_});
|
||||||
|
|
||||||
$self->{printer}->{$instance} = { display => $instance, errors => {} };
|
$self->{printer}->{$instance} = { display => $instance, errors => {} };
|
||||||
if ($result->{$_} == 0) {
|
|
||||||
$self->{printer}->{$instance}->{errors}->{0} = { status => 'ok' };
|
|
||||||
next;
|
|
||||||
}
|
|
||||||
|
|
||||||
my $i = 0;
|
my $i = 0;
|
||||||
foreach my $key (keys %errors_printer) {
|
foreach my $key (keys %errors_printer) {
|
||||||
if (($value & (1 << $key))) {
|
if (($value & (1 << $key))) {
|
||||||
@ -136,6 +131,11 @@ sub manage_selection {
|
|||||||
$i++;
|
$i++;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if ($i == 0) {
|
||||||
|
$self->{printer}->{$instance}->{errors}->{0} = { status => 'ok' };
|
||||||
|
next;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user