Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
emulab-devel
Project overview
Project overview
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Merge Requests
0
Merge Requests
0
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Commits
Open sidebar
Elijah Grubb
emulab-devel
Commits
0f7a6de1
Commit
0f7a6de1
authored
Jul 17, 2003
by
Robert Ricci
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Use card numbers rather than iface names.
parent
1f2956b8
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
4 deletions
+4
-4
www/newnodecheckin.php
www/newnodecheckin.php
+4
-4
No files found.
www/newnodecheckin.php
View file @
0f7a6de1
...
...
@@ -27,7 +27,7 @@ foreach ($HTTP_GET_VARS as $key => $value) {
if
(
$vartype
==
"name"
)
{
if
(
preg_match
(
"/^([a-z]+)(\d+)$/i"
,
$value
,
$matches
))
{
$interfaces
[
$ifacenum
][
"type"
]
=
$matches
[
1
];
$interfaces
[
$ifacenum
][
"
iface"
]
=
"eth
$ifacenum
"
;
$interfaces
[
$ifacenum
][
"
card"
]
=
$ifacenum
;
}
else
{
echo
"Bad interface name
$value
!"
;
continue
;
...
...
@@ -71,19 +71,19 @@ $row = mysql_fetch_array($query_result);
$new_node_id
=
$row
[
0
];
foreach
(
$interfaces
as
$interface
)
{
$
iface
=
$interface
[
"iface
"
];
$
card
=
$interface
[
"card
"
];
$mac
=
$interface
[
"mac"
];
$type
=
$interface
[
"type"
];
if
(
$mac_list
[
$mac
][
"switch"
])
{
DBQueryFatal
(
"insert into new_interfaces set "
.
"new_node_id=
$new_node_id
,
iface='
$iface
'
, mac='
$mac
', "
.
"new_node_id=
$new_node_id
,
card=
$card
, mac='
$mac
', "
.
"interface_type='
$type
', "
.
"switch_id='
$mac_list[$mac][switch]
', "
.
"switch_card='
$mac_list[$mac][card]
', "
.
"switch_port='
$mac_list[$mac][port]
'"
);
}
else
{
DBQueryFatal
(
"insert into new_interfaces set "
.
"new_node_id=
$new_node_id
,
iface='
$iface
'
, mac='
$mac
', "
.
"new_node_id=
$new_node_id
,
card=
$card
, mac='
$mac
', "
.
"interface_type='
$type
'"
);
}
}
...
...
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