poller overhaul. system/os split into modules. each device is wrapped in poll_device(). this probably breaks everything for you. adios, little datums.

git-svn-id: http://www.observium.org/svn/observer/trunk@2231 61d68cd4-352d-0410-923a-c4978735b2b8
This commit is contained in:
Adam Amstrong
2011-05-03 21:17:04 +00:00
parent c5bac776db
commit b11ad816aa
7 changed files with 202 additions and 205 deletions

View File

@@ -252,11 +252,11 @@ function set_dev_attrib($device, $attrib_type, $attrib_value)
function get_dev_attribs($device)
{
$attribs = array();
$sql = "SELECT attrib_type, attrib_value FROM devices_attribs WHERE `device_id` = '" . mres($device['device_id']) . "'";
$data = mysql_query($sql);
while($entry = mysql_fetch_array($data))
$sql = "SELECT * FROM devices_attribs WHERE `device_id` = '" . mres($device) . "'";
$query = mysql_query($sql);
while($entry = mysql_fetch_assoc($query))
{
$attribs[$entry['attrib_type']] = $attribs['attrib_value'];
$attribs[$entry['attrib_type']] = $entry['attrib_value'];
}
return $attribs;
}