Commit 243921d5 authored by Mac Newbold's avatar Mac Newbold

Fix a couple of minor glitches.

parent 97483077
...@@ -85,8 +85,8 @@ sub initStateWait( $@ ) { ...@@ -85,8 +85,8 @@ sub initStateWait( $@ ) {
$tuple = address_tuple_alloc(); $tuple = address_tuple_alloc();
if (!$tuple) { die "Could not allocate an address tuple\n"; } if (!$tuple) { die "Could not allocate an address tuple\n"; }
%$tuple = ( objtype => TBDB_TBEVENT_NODESTATE #, %$tuple = ( objtype => TBDB_TBEVENT_NODESTATE,
eventtype => join(",",@$states), eventtype => join(",",@$states),
objname => join(",",@nodes) ); objname => join(",",@nodes) );
if ($debug > 1) { if ($debug > 1) {
...@@ -126,7 +126,7 @@ sub doEvent( $$$ ) { ...@@ -126,7 +126,7 @@ sub doEvent( $$$ ) {
"$eventtype\n"; "$eventtype\n";
} }
my $n = $objname; my $n = $objname;
if (@{$remain{$n}}[0] eq $eventtype) { if (defined($remain{$n}) && @{$remain{$n}}[0] eq $eventtype) {
# this is the next state we were waiting for # this is the next state we were waiting for
if ($debug) { print "Got $eventtype for $n\n" }; if ($debug) { print "Got $eventtype for $n\n" };
shift(@{$remain{$n}}); shift(@{$remain{$n}});
...@@ -137,7 +137,6 @@ sub doEvent( $$$ ) { ...@@ -137,7 +137,6 @@ sub doEvent( $$$ ) {
delete($remain{$n}); delete($remain{$n});
} }
} }
#exit(0);
} }
sub waitForState( $$;$ ) { sub waitForState( $$;$ ) {
......
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