Fix $transport not defined bug

This commit is contained in:
bohdan-s
2014-06-23 19:29:53 -04:00
parent b5f38f6a30
commit f9a7441b4e

View File

@ -24,7 +24,7 @@ if ($_POST['hostname'])
$snmpver = mres($_POST['snmpver']);
if ($_POST['port']) { $port = mres($_POST['port']); } else { $port = $config['snmp']['port']; }
$transport = mres($_POST['transport']);
if ($_POST['transport']) { $transport = mres($_POST['transport']); } else { $transport = "udp"; }
print_message("Adding host $hostname communit" . (count($config['snmp']['community']) == 1 ? "y" : "ies") . " " . implode(', ',$config['snmp']['community']) . " port $port using $transport");
}
elseif ($_POST['snmpver'] === "v3")