Commit a3b031ac authored by Leigh Stoller's avatar Leigh Stoller

Bug Fix; Not sure why this is happening, but sometime the slice urn has

extra double quotes around it. Kill them so the instance lookup does not
fail. Someday I will figure out why this is happening.
parent 22e96be7
......@@ -158,6 +158,14 @@ sub callback($$$)
my $type = event_notification_get_string($handle, $note, "type");
my $details = event_notification_get_string($handle, $note, "details");
#
# Not sure why this is happening, but sometime the slice urn has
# extra double quotes around it. Kill them so the instance lookup
# does not fail. Someday I will figure out why this is happening.
#
if ($slice =~ /^\"(.*)\"$/) {
$slice = $1;
}
if ($debug) {
print "Event: $time $site $type $urn $slice $details\n";
}
......@@ -228,19 +236,6 @@ sub HandleImageStatus($$$)
}
}
#
# Loop processing events.
#
while (1)
{
$gotone = 1;
while ($gotone) {
$gotone = 0;
event_poll($localhandle);
}
event_poll_blocking($localhandle, 1000);
}
#
# Setup a signal handler for newsyslog.
#
......@@ -255,6 +250,19 @@ sub handler()
$SIG{HUP} = \&handler
if (! ($debug || $impotent));
#
# Loop processing events.
#
while (1)
{
$gotone = 1;
while ($gotone) {
$gotone = 0;
event_poll($localhandle);
}
event_poll_blocking($localhandle, 1000);
}
exit(0);
sub fatal($)
......
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