Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
emulab-devel
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
143
Issues
143
List
Boards
Labels
Service Desk
Milestones
Merge Requests
6
Merge Requests
6
Operations
Operations
Incidents
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
emulab
emulab-devel
Commits
3e469a1d
Commit
3e469a1d
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
efd252a0
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 @
3e469a1d
...
...
@@ -716,6 +716,29 @@ sub GetAllocState($$)
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