This commit is contained in:
bohdan-s
2014-06-21 08:06:28 -04:00
parent cb41d50094
commit b5f38f6a30

View File

@@ -260,8 +260,7 @@ function addHost($host, $snmpver, $port = '161', $transport = 'udp')
// Test Database Exists
if (dbFetchCell("SELECT COUNT(*) FROM `devices` WHERE `hostname` = ?", array($host)) == '0')
{
// Test DNS lookup
//if (gethostbyname($host) != $host)
// Test if IP or Hostname
if (!(inet_pton($host)))
{
// Test reachability