From d59695f08e90844ea3170b6e5b4caf1a219c7eb2 Mon Sep 17 00:00:00 2001 From: Tony Murray Date: Wed, 15 Nov 2017 11:26:25 -0600 Subject: [PATCH] fix: revert to two gets for sysDescr and sysObjectID Some devices don't like asking for them in one get for some reason. --- includes/functions.php | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/includes/functions.php b/includes/functions.php index e8f5049423..8b03a41032 100644 --- a/includes/functions.php +++ b/includes/functions.php @@ -93,9 +93,8 @@ function logfile($string) */ function getHostOS($device) { - $res = snmp_get_multi_oid($device, array('SNMPv2-MIB::sysDescr.0', 'SNMPv2-MIB::sysObjectID.0')); - $sysDescr = isset($res['.1.3.6.1.2.1.1.1.0']) ? $res['.1.3.6.1.2.1.1.1.0'] : ''; - $sysObjectId = isset($res['.1.3.6.1.2.1.1.2.0']) ? $res['.1.3.6.1.2.1.1.2.0'] : ''; + $sysDescr = snmp_get($device, "SNMPv2-MIB::sysDescr.0", "-Ovq"); + $sysObjectId = snmp_get($device, "SNMPv2-MIB::sysObjectID.0", "-Ovqn"); d_echo("| $sysDescr | $sysObjectId | \n");