Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
emulab
emulab-devel
Commits
8f459f37
Commit
8f459f37
authored
Mar 07, 2007
by
Leigh B. Stoller
Browse files
Fix minor bug.
parent
a672a06c
Changes
1
Hide whitespace changes
Inline
Side-by-side
tbsetup/Template.pm.in
View file @
8f459f37
...
...
@@ -215,6 +215,15 @@ sub Create($$)
return
undef
if
(
ref
($
class
));
my
$
pid
=
$
argref
->{
'pid'
};
my
$
gid
=
$
argref
->{
'gid'
};
#
Need
the
group
object
since
we
want
to
use
its
idx
.
my
$
group
=
Group
->
LookupByPidGid
($
pid
,
$
gid
);
if
(
!defined($group)) {
tberror
(
"Could not map $pid/$gid to its object!"
);
return
undef
;
}
#
See
if
this
a
child
of
an
existing
template
.
if
(
defined
($
argref
->{
'parent_guid'
}))
{
$
guid
=
$
argref
->{
'parent_guid'
};
...
...
@@ -254,16 +263,7 @@ sub Create($$)
#
We
make
up
an
eid
using
the
guid
and
version
.
This
is
the
eid
for
the
#
hidden
experiment
behind
each
template
.
my
$
eid
=
"T${guid}-${vers}"
;
my
$
pid
=
$
argref
->{
'pid'
};
my
$
gid
=
$
argref
->{
'gid'
};
#
Need
the
group
object
since
we
want
to
use
its
idx
.
my
$
group
=
Group
->
LookupByPidGid
($
pid
,
$
gid
);
if
(
!defined($group)) {
DBQueryWarn
(
"unlock tables"
);
tberror
(
"Could not map $pid/$gid to its object!"
);
return
undef
;
}
$
argref
->{
'pid_idx'
}
=
$
group
->
pid_idx
();
$
argref
->{
'gid_idx'
}
=
$
group
->
gid_idx
();
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new 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