fixes and cleanups

git-svn-id: http://www.observium.org/svn/observer/trunk@3018 61d68cd4-352d-0410-923a-c4978735b2b8
This commit is contained in:
Tom Laermans
2012-04-10 15:53:10 +00:00
parent 4e0c3fd679
commit 764cb72cd5
7 changed files with 8 additions and 11 deletions
@@ -27,7 +27,7 @@ function authenticate($username,$password)
return 0;
}
function passwordscanchange()
function passwordscanchange($username = "")
{
return 0;
}
@@ -42,7 +42,7 @@ function auth_usermanagement()
return 1;
}
function adduser($username, $password, $level, $email = "", $realname = "")
function adduser($username, $password, $level, $email = "", $realname = "", $can_modify_passwd = '1')
{
return dbInsert(array('username' => $username, 'password' => $password, 'level' => $level, 'email' => $email, 'realname' => $realname), 'users');
}
+2 -2
View File
@@ -47,7 +47,7 @@ function authenticate($username,$password)
return 0;
}
function passwordscanchange()
function passwordscanchange($username = "")
{
return 0;
}
@@ -62,7 +62,7 @@ function auth_usermanagement()
return 0;
}
function adduser($username, $password, $level, $email = "", $realname = "")
function adduser($username, $password, $level, $email = "", $realname = "", $can_modify_passwd = '1')
{
# Not supported
return 0;
+1 -1
View File
@@ -24,7 +24,7 @@ function authenticate($username,$password)
return 0;
}
function passwordscanchange($username="")
function passwordscanchange($username = "")
{
/*
* By default allow the password to be modified, unless the existing
+1 -1
View File
@@ -23,7 +23,7 @@ if ($device['os'] != "Snom")
$snmpstring .= " IP-MIB::".$oid.".0";
}
$data = snmp_get_multi($device, $snmpstring, NULL, "IP-MIB");
$data = snmp_get_multi($device, $snmpstring, "-OQUs", "IP-MIB");
$rrdupdate = "N";
+1 -1
View File
@@ -27,7 +27,7 @@ if ($device['os'] != "Snom")
$snmpstring .= " tcpHCInSegs.0";
$snmpstring .= " tcpHCOutSegs.0";
$data = snmp_get_multi($device, $snmpstring, NULL, "TCP-MIB");
$data = snmp_get_multi($device, $snmpstring, "-OQUs", "TCP-MIB");
$rrdupdate = "N";
+1 -1
View File
@@ -22,7 +22,7 @@ if ($device['os'] != "Snom")
$snmpstring .= " UDP-MIB::".$oid.".0";
}
$data = snmp_get_multi($device, $snmpstring, NULL, "UDP-MIB");
$data = snmp_get_multi($device, $snmpstring, "-OQUs", "UDP-MIB");
$rrdupdate = "N";
-3
View File
@@ -14,8 +14,6 @@ function snmp_get_multi($device, $oids, $options = "-OQUs", $mib = NULL, $mibdir
{
global $debug,$config,$runtime_stats,$mibs_loaded;
if (!$options) { $options = "-OQUs"; }
if (is_numeric($device['timeout']) && $device['timeout'] > 0)
{
$timeout = $device['timeout'];
@@ -133,7 +131,6 @@ function snmp_walk($device, $oid, $options = NULL, $mib = NULL, $mibdir = NULL)
$device['transport'] = "udp";
}
// php has no bulkwalk functionality, so use binary for this.
if ($device['snmpver'] == 'v1' || $config['os'][$device['os']]['nobulk'])
{
$snmpcommand = $config['snmpwalk'];