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
23f4cb30
Commit
23f4cb30
authored
Aug 24, 2017
by
Leigh B Stoller
Browse files
Use Interface->LookupByIface() if we know the iface (say, from the
wires table lookup).
parent
92f70375
Changes
1
Hide whitespace changes
Inline
Side-by-side
db/Port.pm
View file @
23f4cb30
...
...
@@ -507,7 +507,7 @@ sub LookupByIface($$;$)
sub
LookupByTriple
($$
;
$$
)
{
my
(
$class
,
$nodeid
,
$card
,
$port
)
=
@_
;
my
$interface
;
my
$strtriple
;
if
(
!
defined
(
$card
))
{
...
...
@@ -553,7 +553,15 @@ sub LookupByTriple($$;$$)
}
$inst
->
{"
WIRES_ROW
"}
=
$wire
;
my
$interface
=
Interface
->
Lookup
(
$nodeid
,
$card
,
$port
);
#
# Lookup the interface for the correct side of the wire.
#
if
(
$wire
->
node_id2
()
eq
$nodeid
)
{
$interface
=
Interface
->
LookupByIface
(
$nodeid
,
$wire
->
iface2
());
}
else
{
$interface
=
Interface
->
LookupByIface
(
$nodeid
,
$wire
->
iface1
());
}
# Note: The code will almost always fall into this conditional
# block for switch ports because we typically do not have entries
...
...
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