Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
7
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Open sidebar
emulab
emulab-devel
Commits
93e9b569
Commit
93e9b569
authored
Dec 22, 2009
by
Leigh B. Stoller
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add GetEventState() which always goes to the DB.
parent
3e469a1d
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
23 additions
and
0 deletions
+23
-0
db/Node.pm.in
db/Node.pm.in
+23
-0
No files found.
db/Node.pm.in
View file @
93e9b569
...
...
@@ -739,6 +739,29 @@ sub GetEventState($$)
return 0;
}
#
# We do this cause we always want to go to the DB.
#
sub GetEventState($$)
{
my ($self, $pstate) = @_;
my $node_id = $self->node_id();
my $query_result =
DBQueryWarn("select eventstate from nodes where node_id='
$
node_id
'");
return -1
if (!$query_result || !$query_result->numrows);
my ($state) = $query_result->fetchrow_array();
$state = TBDB_NODESTATE_UNKNOWN
if (!defined($state));
$self->{'
DBROW
'} = $state
if (defined($self->{'
DBROW
'}));
$$pstate = $state;
return 0;
}
#
# Equality test for two experiments.
# Not strictly necessary in perl, but good form.
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment