fix printer errror status

This commit is contained in:
garnier-quentin 2019-02-28 10:48:20 +01:00
parent 6f000196ee
commit 3f9a2d5bae
1 changed files with 5 additions and 5 deletions

View File

@ -124,11 +124,6 @@ sub manage_selection {
my $value = unpack('S', $result->{$_});
$self->{printer}->{$instance} = { display => $instance, errors => {} };
if ($result->{$_} == 0) {
$self->{printer}->{$instance}->{errors}->{0} = { status => 'ok' };
next;
}
my $i = 0;
foreach my $key (keys %errors_printer) {
if (($value & (1 << $key))) {
@ -136,6 +131,11 @@ sub manage_selection {
$i++;
}
}
if ($i == 0) {
$self->{printer}->{$instance}->{errors}->{0} = { status => 'ok' };
next;
}
}
}