Scrut fixes

This commit is contained in:
laf
2015-10-17 19:11:21 +00:00
parent 96a0abbeca
commit 94c5afb2db
2 changed files with 3 additions and 3 deletions

View File

@ -483,11 +483,11 @@ function isSNMPable($device) {
*
* @param string $hostname The hostname or IP address to send ping requests to.
* @param int $address_family The address family (AF_INET for IPv4 or AF_INET6 for IPv6) to use. Defaults to IPv4. Will *not* be autodetected for IP addresses, so it has to be set to AF_INET6 when pinging an IPv6 address or an IPv6-only host.
* @param int $device_id This parameter is currently ignored.
* @param array $attribs The device attributes
*
* @return bool TRUE if the host responded to at least one ping request, FALSE otherwise.
*/
function isPingable($hostname, $address_family = AF_INET, $device_id = FALSE, $attribs = false) {
function isPingable($hostname, $address_family = AF_INET, $attribs = array()) {
global $config;
$response = array();

View File

@ -155,7 +155,7 @@ function poll_device($device, $options) {
$address_family = snmpTransportToAddressFamily($device['transport']);
$ping_response = isPingable($device['hostname'], $address_family, $device['device_id'], $attribs);
$ping_response = isPingable($device['hostname'], $address_family, $attribs);
$device_perf = $ping_response['db'];
$device_perf['device_id'] = $device['device_id'];