From a4fcf7d252697949793d68f6ac2706bed0a30d87 Mon Sep 17 00:00:00 2001 From: Adam Amstrong Date: Thu, 8 Sep 2011 17:09:36 +0000 Subject: [PATCH] fix host adding (oopsie) git-svn-id: http://www.observium.org/svn/observer/trunk@2439 61d68cd4-352d-0410-923a-c4978735b2b8 --- includes/discovery/os/symbol.inc.php | 1 - includes/functions.php | 4 ++-- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/includes/discovery/os/symbol.inc.php b/includes/discovery/os/symbol.inc.php index 0d1ce2e044..e90c95a67a 100644 --- a/includes/discovery/os/symbol.inc.php +++ b/includes/discovery/os/symbol.inc.php @@ -3,7 +3,6 @@ if (!$os) { if (strstr($sysObjectId, ".1.3.6.1.4.1.388")) { $os = "symbol"; } - echo "symbol"; } ?> diff --git a/includes/functions.php b/includes/functions.php index 6f0ed609ca..856dabf615 100755 --- a/includes/functions.php +++ b/includes/functions.php @@ -184,10 +184,10 @@ function addHost($host, $community, $snmpver, $port = '161', $transport = 'udp') if (dbFetchCell("SELECT COUNT(*) FROM `devices` WHERE `hostname` = ?", array($host)) == '0') { /// Test DNS lookup - if (isDomainResolves($argv[1])) + if (gethostbyname($host) != $host) { /// Test reachability - if (isPingable($argv[1])) + if (isPingable($host)) { $added = 0; /// try each community from config