more eventlog fixes

git-svn-id: http://www.observium.org/svn/observer/trunk@552 61d68cd4-352d-0410-923a-c4978735b2b8
This commit is contained in:
Adam Amstrong
2009-12-16 13:48:05 +00:00
parent df386fc721
commit e71e87af6f
4 changed files with 12 additions and 6 deletions
+2
View File
@@ -39,6 +39,7 @@
if (preg_match('/ng[0-9]+$/', $if)) { $nullintf = 1; }
}
if ($nullintf == 0) {
echo("$if\n");
if(mysql_result(mysql_query("SELECT COUNT(*) FROM `interfaces` WHERE `device_id` = '".$device['device_id']."' AND `ifIndex` = '$ifIndex'"), 0) == '0') {
mysql_query("INSERT INTO `interfaces` (`device_id`,`ifIndex`,`ifDescr`) VALUES ('".$device['device_id']."','$ifIndex','$ifDescr')");
# Add Interface
@@ -60,6 +61,7 @@
# Delete Interface
echo("-"); ## Deleted Interface
} else {
echo("$if\n");
echo("X"); ## Ignored Interface
}
}