mirror of
https://github.com/librenms/librenms.git
synced 2024-10-07 16:52:45 +00:00
Merge pull request #673 from laf/issue-672
Fixed the issue with ports constantly logging descr changes
This commit is contained in:
@@ -277,8 +277,15 @@ foreach ($ports as $port)
|
|||||||
$attrib_key = "port_descr_".$attrib;
|
$attrib_key = "port_descr_".$attrib;
|
||||||
if ($port_ifAlias[$attrib] != $port[$attrib_key])
|
if ($port_ifAlias[$attrib] != $port[$attrib_key])
|
||||||
{
|
{
|
||||||
|
if (!isset($port_ifAlias[$attrib])) {
|
||||||
|
$port_ifAlias[$attrib] = array('NULL');
|
||||||
|
$log_port = 'NULL';
|
||||||
|
} else {
|
||||||
|
$log_port = $port_ifAlias[$attrib];
|
||||||
|
}
|
||||||
$port['update'][$attrib_key] = $port_ifAlias[$attrib];
|
$port['update'][$attrib_key] = $port_ifAlias[$attrib];
|
||||||
log_event($attrib . ": ".$port[$attrib_key]." -> " . $port_ifAlias[$attrib], $device, 'interface', $port['port_id']);
|
log_event($attrib . ": ".$port[$attrib_key]." -> " . $log_port, $device, 'interface', $port['port_id']);
|
||||||
|
unset($log_port);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user