Commit dbac23a3 authored by Leigh B Stoller's avatar Leigh B Stoller
Browse files

Bug Fix: If a CM fails to respond, but we have an existing

advertisement, continue to use it.
parent e3ca221a
......@@ -142,9 +142,6 @@ $SIG{HUP} = \&handler
GeniUtil::FlipToGeniUser();
# Do not wait long.
Genixmlrpc->SetTimeout(10);
#
# Probe CMs
#
......@@ -185,21 +182,23 @@ sub ProbeCMs()
# Returns a string of xml.
#
my $resources = $authority->DiscoverResources(undef, 0);
# Errors will go to the log.
next
if (!defined($resources));
if (open(OUT, "> $ADDIR/$urn")) {
print OUT $resources;
print OUT "\n";
close(OUT);
# Save the name so we can write the text file at the end.
$ads{$urn} = $urn;
if (defined($resources)) {
if (open(OUT, "> $ADDIR/$urn")) {
print OUT $resources;
print OUT "\n";
close(OUT);
# Save the name so we can write the text file at the end.
$ads{$urn} = $urn;
}
else {
notify("Could not open $ADDIR/$urn for output\n");
next;
}
}
else {
notify("Could not open $ADDIR/$urn for output\n");
next;
elsif (-e "$ADDIR/$urn" && -s "$ADDIR/$urn") {
# Reuse the old one.
$ads{$urn} = $urn;
}
}
if (open(MAP, "> $ADDIR/list.txt")) {
......
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