From 6dc4d22e510e8fce58a626fb49d4ec59e72cace8 Mon Sep 17 00:00:00 2001 From: Tom Laermans Date: Fri, 15 Apr 2011 16:35:39 +0000 Subject: [PATCH] don't just echo sysdescr and objectid when adding a host git-svn-id: http://www.observium.org/svn/observer/trunk@2086 61d68cd4-352d-0410-923a-c4978735b2b8 --- includes/functions.php | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/includes/functions.php b/includes/functions.php index 6a4c68a1a..1c092c578 100755 --- a/includes/functions.php +++ b/includes/functions.php @@ -65,12 +65,15 @@ function device_array($device_id) function getHostOS($device) { - global $config; + global $config, $debug; $sysDescr = snmp_get ($device, "SNMPv2-MIB::sysDescr.0", "-Ovq"); $sysObjectId = snmp_get ($device, "SNMPv2-MIB::sysObjectID.0", "-Ovqn"); - echo("| $sysDescr | $sysObjectId | "); + if ($debug) + { + echo("| $sysDescr | $sysObjectId | "); + } $dir_handle = @opendir($config['install_dir'] . "/includes/discovery/os") or die("Unable to open $path"); while ($file = readdir($dir_handle))