mirror of
https://github.com/librenms/librenms.git
synced 2024-10-07 16:52:45 +00:00
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:
committed by
Tony Murray
parent
3c9a0f9c6b
commit
f715c2ea94
@ -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);
|
||||
}
|
||||
|
||||
/**
|
||||
|
Reference in New Issue
Block a user