Commit daef931c authored by Leigh B. Stoller's avatar Leigh B. Stoller
Browse files

Minor fixes to previous revision. Also add some debugging.

parent cb02a386
......@@ -513,14 +513,17 @@ sub AddMember($$;$)
return undef
if (!ref($self));
if (!ref($node)) {
$node = Node->Lookup($node);
return undef
if (!defined($node));
}
my $member = Lan::Member->Create($self);
if (defined($node)) {
if (!ref($node)) {
$node = Node->Lookup($node);
if (!defined($node)) {
$member->Destroy();
return undef;
}
}
# And the node.
if ($member->SetAttribute("node_id", $node->node_id()) != 0) {
$member->Destroy();
......@@ -1526,8 +1529,11 @@ sub InstantiateAll($)
my ($class) = @_;
foreach my $protolan (values(%protolans)) {
$protolan->Instantiate() == 0
or return -1;
if ($protolan->Instantiate() != 0) {
print STDERR "*** Could not instantiate protolan: " .
$protolan->Dump() . "\n";
return -1;
}
}
return 0;
}
......
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