fix: Ignore toners with values -2 which is unknown #5637 (#5654)

This commit is contained in:
Neil Lathwood
2017-01-31 08:07:50 +00:00
committed by GitHub
parent 981e974a70
commit 4390347508
2 changed files with 20 additions and 13 deletions

View File

@@ -48,17 +48,19 @@ if ($device['os_group'] == 'printer') {
$capacity = get_toner_capacity($data['prtMarkerSuppliesMaxCapacity']);
$current = get_toner_levels($device, $raw_toner, $capacity);
discover_toner(
$valid_toner,
$device,
$toner_oid,
$last_index,
$type,
$descr,
$capacity_oid,
$capacity,
$current
);
if (is_numeric($current)) {
discover_toner(
$valid_toner,
$device,
$toner_oid,
$last_index,
$type,
$descr,
$capacity_oid,
$capacity,
$current
);
}
}
}