mirror of
https://github.com/SerenityOS/serenity.git
synced 2025-01-23 18:02:05 -05:00
Applets/Network: Remove include_loopback
parameter
This is always false, so we can do without it and simplify things a little.
This commit is contained in:
parent
c8bfb07b41
commit
eacf017112
1 changed files with 5 additions and 5 deletions
|
@ -105,7 +105,7 @@ private:
|
|||
m_connected = connected;
|
||||
}
|
||||
|
||||
virtual String get_adapter_info(bool include_loopback = false)
|
||||
virtual String get_adapter_info()
|
||||
{
|
||||
StringBuilder adapter_info;
|
||||
|
||||
|
@ -127,16 +127,16 @@ private:
|
|||
return adapter_info.to_string();
|
||||
|
||||
int connected_adapters = 0;
|
||||
json.value().as_array().for_each([&adapter_info, include_loopback, &connected_adapters](auto& value) {
|
||||
json.value().as_array().for_each([&adapter_info, &connected_adapters](auto& value) {
|
||||
auto& if_object = value.as_object();
|
||||
auto ip_address = if_object.get("ipv4_address"sv).as_string_or("no IP");
|
||||
auto ifname = if_object.get("name"sv).to_string();
|
||||
auto link_up = if_object.get("link_up"sv).as_bool();
|
||||
auto link_speed = if_object.get("link_speed"sv).to_i32();
|
||||
|
||||
if (!include_loopback)
|
||||
if (ifname == "loop")
|
||||
return;
|
||||
if (ifname == "loop")
|
||||
return;
|
||||
|
||||
if (ip_address != "null")
|
||||
connected_adapters++;
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue