Commit 759c8c83 authored by Robert Ricci's avatar Robert Ricci

Back out Mac's last changes, since they seem to have broken things.

parent df0b78d2
......@@ -135,7 +135,7 @@ setpriority(PRIO_PROCESS, 0, 15);
# read nodes
my $result = DBQueryWarn("SELECT vname,fixed FROM virt_nodes " .
my $result = DBQueryWarn("SELECT vname FROM virt_nodes " .
"WHERE pid='$pid' AND eid='$eid'");
fatal("Failed to get virt_nodes info from DB")
......@@ -144,23 +144,10 @@ fatal("Failed to get virt_nodes info from DB")
my $nodes = ();
my $lans = ();
my $links = ();
my $fixednodes = ();
# all virt_nodes are visualizer nodes of type "node"
while (my ($vname,$fixed) = $result->fetchrow) {
if (!defined($fixednodes{$vname})) {
# This node is not a parent node, so we can add it
while (my ($vname) = $result->fetchrow) {
$nodes{$vname}{"type"} = "node";
}
if (defined($fixed) && $fixed ne "") {
# $vname is a subnode of $fixed, so we don't want
# to viz any vnames named $fixed
$fixednodes{$fixed} = $vname;
if (defined($nodes{$fixed})) {
# Remove the node if it is already there
delete $nodes{$fixed};
}
}
}
# read lans
......@@ -173,10 +160,7 @@ fatal("Failed to get virt_lans info from DB")
while (my ($vname, $member) = $result->fetchrow) {
$member =~ s/\:.*//;
if (defined($nodes{$vname})) {
# the node exists, so add the link
$lans{$vname}{$member} = 1;
}
}
# construct links from lans
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment