mirror of
https://github.com/librenms/librenms.git
synced 2024-10-07 16:52:45 +00:00
fix host adding (oopsie)
git-svn-id: http://www.observium.org/svn/observer/trunk@2439 61d68cd4-352d-0410-923a-c4978735b2b8
This commit is contained in:
@@ -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
|
||||
|
Reference in New Issue
Block a user