From 427e317c85cc443148546010d1cea3af0bb86f5b Mon Sep 17 00:00:00 2001 From: Tom Laermans Date: Sat, 16 Jan 2010 23:58:27 +0000 Subject: [PATCH] fix snmp cache value functions git-svn-id: http://www.observium.org/svn/observer/trunk@706 61d68cd4-352d-0410-923a-c4978735b2b8 --- includes/functions-poller.inc.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/includes/functions-poller.inc.php b/includes/functions-poller.inc.php index ccb2e2cd3..bc05377bd 100644 --- a/includes/functions-poller.inc.php +++ b/includes/functions-poller.inc.php @@ -62,7 +62,7 @@ function snmpwalk_cache_oid($poll_oid, $device, $array, $mib = 0) { list($oid,$value) = explode("=", $entry); $oid = trim($oid); $value = trim($value); list($oid, $index) = explode(".", $oid); - if (!strstr($this_value, "at this OID") && isset($oid) && isset($index)) { + if (!strstr($value, "at this OID") && isset($oid) && isset($index)) { $array[$device_id][$index][$oid] = $value; } } @@ -81,7 +81,7 @@ function snmpwalk_cache_twopart_oid($oid, $device, $array, $mib = 0) { list($oid,$value) = explode("=", $entry); $oid = trim($oid); $value = trim($value); list($oid, $first, $second) = explode(".", $oid); - if (!strstr($this_value, "at this OID") && isset($oid) && isset($first) && isset($second)) { + if (!strstr($value, "at this OID") && isset($oid) && isset($first) && isset($second)) { $array[$device_id][$first][$second][$oid] = $value; } } @@ -101,7 +101,7 @@ function snmpwalk_cache_threepart_oid($oid, $device, $array, $mib = 0) { $oid = trim($oid); $value = trim($value); list($oid, $first, $second, $third) = explode(".", $oid); if($debug) {echo("$entry || $oid || $first || $second || $third\n");} - if (!strstr($this_value, "at this OID") && isset($oid) && isset($first) && isset($second) && isset($third)) { + if (!strstr($value, "at this OID") && isset($oid) && isset($first) && isset($second) && isset($third)) { $array[$device_id][$first][$second][$third][$oid] = $value; } }