Commit da016646 authored by Leigh Stoller's avatar Leigh Stoller

Quickie hack to fix no links problem message on plab nodes.

parent fd400e47
......@@ -1407,15 +1407,21 @@ sub TBSetBatchCancelFlag($$$)
# returns the list if a valid pid/eid.
# returns 0 if an invalid pid/eid or if an error.
#
sub ExpNodes($$)
sub ExpNodes($$;$)
{
my($pid, $eid) = @_;
my($pid, $eid, $flag) = @_;
my(@row);
my(@nodes);
my $clause = "";
if (defined($flag)) {
$clause = "and nt.isremotenode=0";
}
my $query_result =
DBQueryWarn("select node_id from reserved where ".
"pid='$pid' and eid='$eid'");
DBQueryWarn("select r.node_id from reserved as r ".
"left join nodes as n on n.node_id=r.node_id ".
"left join node_types as nt on nt.type=n.type ".
"where r.pid='$pid' and r.eid='$eid' $clause");
if (! $query_result or
$query_result->numrows == 0) {
......
......@@ -273,7 +273,7 @@ if (! $frontend) {
# Look for the unsual case of more than 2 nodes and no vlans. Send a
# warning message.
#
if (ExpNodes($pid, $eid) > 2) {
if (ExpNodes($pid, $eid, 1) > 2) {
my $vlans_result =
DBQueryFatal("select pid from virt_lans where ".
"pid='$pid' and eid='$eid'");
......
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