Removed code that performs hostname check

This commit is contained in:
laf
2015-05-20 13:22:58 +01:00
parent c9492ac4cc
commit 23f2825d1f

View File

@ -285,9 +285,6 @@ function addHost($host, $snmpver, $port = '161', $transport = 'udp', $quiet = '0
// Test Database Exists
if (dbFetchCell("SELECT COUNT(*) FROM `devices` WHERE `hostname` = ?", array($host)) == '0')
{
// Test if IP or Hostname
if (!(inet_pton($host)))
{
// Test reachability
if ($force_add == 1 || isPingable($host))
{
@ -372,10 +369,6 @@ function addHost($host, $snmpver, $port = '161', $transport = 'udp', $quiet = '0
// failed Reachability
if($quiet == '0') { print_error("Could not ping $host"); }
}
} else {
// Failed DNS lookup
if($quiet == '0') { print_error("$host looks like an IP address, please use FQDN"); }
}
} else {
// found in database
if($quiet == '0') { print_error("Already got host $host"); }