diff --git a/includes/common.php b/includes/common.php index 891ed1a0b..780082a0c 100644 --- a/includes/common.php +++ b/includes/common.php @@ -737,6 +737,25 @@ function round_Nth($val = 0, $round_to) { } // end round_Nth +/* + * @return true if this device should be polled with MIB-based discovery + */ +function is_mib_poller_enabled($device) +{ + if (!is_module_enabled('poller', 'mib')) { + d_echo("MIB polling module disabled globally.\n"); + return false; + } + + if (!is_dev_attrib_enabled($device, 'poll_mib')) { + d_echo('MIB module disabled for '.$device['hostname']."\n"); + return false; + } + + return true; +} // is_mib_poller_enabled + + /* * FIXME: Dummy implementation */ diff --git a/includes/snmp.inc.php b/includes/snmp.inc.php index cb83d8068..6d1c32238 100644 --- a/includes/snmp.inc.php +++ b/includes/snmp.inc.php @@ -1211,24 +1211,6 @@ function load_device_mibs($device) } // load_device_mibs -/* - * @return true if this device should be polled with MIB-based discovery - */ -function is_mib_poller_enabled($device) -{ - if (!is_module_enabled('poller', 'mib')) { - d_echo("MIB polling module disabled globally.\n"); - return false; - } - - if (!is_dev_attrib_enabled($device, 'poll_mib')) { - d_echo('MIB module disabled for '.$device['hostname']."\n"); - return false; - } - - return true; -} // is_mib_poller_enabled - /* * Run MIB-based polling for $device. Update $graphs with the results. */