diff options
author | Magnus Kirø <magnuskiro@gmail.com> | 2016-03-22 11:14:46 +0100 |
---|---|---|
committer | Magnus Kirø <magnuskiro@gmail.com> | 2016-03-22 11:14:46 +0100 |
commit | 7806081670c8c9807fc8b6628b3d7a6eff841ded (patch) | |
tree | 082e522b99cd5b864a8963523f2b3889f6cff808 /web/nms.gathering.org/api/private/switch-update | |
parent | e501dd7dd88bf52edd914a8f078141b91d53939b (diff) | |
parent | 2d19233ba32fd23ad7182d3cccb58cec9e377a75 (diff) |
MERGE fix.
Diffstat (limited to 'web/nms.gathering.org/api/private/switch-update')
-rwxr-xr-x | web/nms.gathering.org/api/private/switch-update | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/web/nms.gathering.org/api/private/switch-update b/web/nms.gathering.org/api/private/switch-update index 3d7b119..6507d2b 100755 --- a/web/nms.gathering.org/api/private/switch-update +++ b/web/nms.gathering.org/api/private/switch-update @@ -22,7 +22,7 @@ my @dups; my $sth = $nms::web::dbh->prepare("SELECT sysname FROM switches WHERE sysname=?"); -my @fields = ('ip', 'sysname', 'switchtype', 'last_updated', 'locked', 'poll_frequency', 'community', 'lldp_chassis_id', 'secondary_ip', 'subnet4', 'subnet6', 'placement', 'distro', 'secondary_ip'); +my @fields = ('ip', 'sysname', 'last_updated', 'locked', 'poll_frequency', 'community', 'lldp_chassis_id', 'secondary_ip', 'subnet4', 'subnet6', 'placement', 'distro', 'secondary_ip'); sub convertplace { @@ -81,7 +81,7 @@ foreach my $tmp2 (@tmp) { } keys %switch; - $nms::web::dbh->do("INSERT INTO SWITCHES (ip, sysname, switchtype, last_updated, locked, poll_frequency, community, lldp_chassis_id, secondary_ip, placement) VALUES ($template{'ip'}, $template{'sysname'}, $template{'switchtype'}, $template{'last_updated'}, $template{'locked'}, $template{'poll_frequency'}, $template{'community'}, $template{'lldp_chassis_id'}, $template{'secondary_ip'}, $template{'placement'});"); + $nms::web::dbh->do("INSERT INTO SWITCHES (ip, sysname, last_updated, locked, poll_frequency, community, lldp_chassis_id, secondary_ip, placement,subnet4,subnet6,distro) VALUES ($template{'ip'}, $template{'sysname'}, $template{'last_updated'}, $template{'locked'}, $template{'poll_frequency'}, $template{'community'}, $template{'lldp_chassis_id'}, $template{'secondary_ip'}, $template{'placement'},$template{'subnet4'},$template{'subnet6'},$template{'distro'});"); push @added, $switch{'sysname'}; } else { if (defined($switch{'placement'})) { |