Commit caeae34f authored by Jonathon Duerig's avatar Jonathon Duerig
Browse files

Do not print out an airswitch if there are no wireless links.

parent 029b7735
...@@ -1958,8 +1958,7 @@ my @wireless_protos = ("80211", "80211a", "80211b", "80211g", "flex900", ...@@ -1958,8 +1958,7 @@ my @wireless_protos = ("80211", "80211a", "80211b", "80211g", "flex900",
my @fake_switch_types = map("*$_:*", @wireless_protos); my @fake_switch_types = map("*$_:*", @wireless_protos);
if (! defined($component_name)) { if (! defined($component_name)) {
print_node($fake_air_switch, \@fake_switch_types, [], [], undef, $air_printed = 0;
[], undef, undef, undef, undef);
foreach my $interface (keys(%interfacetypes)) { foreach my $interface (keys(%interfacetypes)) {
my ($node,$card,$port) = split(":", $interface); my ($node,$card,$port) = split(":", $interface);
...@@ -2002,6 +2001,11 @@ if (! defined($component_name)) { ...@@ -2002,6 +2001,11 @@ if (! defined($component_name)) {
$max_bw = $ifacebw; $max_bw = $ifacebw;
} }
} }
if (! $air_printed) {
print_node($fake_air_switch, \@fake_switch_types, [], [], undef,
[], undef, undef, undef, undef);
$air_printed = 1;
}
print_simple_link($node, $iface, print_simple_link($node, $iface,
$fake_air_switch, $fake_air_iface, $fake_air_switch, $fake_air_iface,
$max_bw, 0, 0, \@intersection); $max_bw, 0, 0, \@intersection);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment