add support for per-OS SNMP max repeaters configuration file setting. (#10628)

* add support for per-OS SNMP max repeaters configuration file setting.

* Simplify function

I think it should be equivalent

* whitespace...
This commit is contained in:
That Guy --^
2019-09-30 06:45:09 -04:00
committed by Tony Murray
parent 3c9a0f9c6b
commit f715c2ea94

View File

@ -1381,15 +1381,8 @@ function snmpwalk_array_num($device, $oid, $indexes = 1)
*/
function get_device_max_repeaters($device)
{
$max_repeaters = $device['snmp_max_repeaters'];
if (isset($max_repeaters) && $max_repeaters > 0) {
return $max_repeaters;
} elseif (Config::get('snmp.max_repeaters') > 0) {
return Config::get('snmp.max_repeaters');
} else {
return false;
}
return $device['snmp_max_repeaters'] ?:
Config::getOsSetting($device['os'], 'snmp.max_repeaters', false);
}
/**