Browse Source
Merge pull request #11256 from FearlessTobi/revert-10075
Partially Revert "Silence nifm spam"
pull/15/merge
bunnei
2 years ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with
15 additions and
2 deletions
-
src/core/internal_network/network.cpp
-
src/core/internal_network/network_interface.cpp
|
|
|
@ -476,7 +476,13 @@ NetworkInstance::~NetworkInstance() { |
|
|
|
std::optional<IPv4Address> GetHostIPv4Address() { |
|
|
|
const auto network_interface = Network::GetSelectedNetworkInterface(); |
|
|
|
if (!network_interface.has_value()) { |
|
|
|
LOG_DEBUG(Network, "GetSelectedNetworkInterface returned no interface"); |
|
|
|
// Only print the error once to avoid log spam
|
|
|
|
static bool print_error = true; |
|
|
|
if (print_error) { |
|
|
|
LOG_ERROR(Network, "GetSelectedNetworkInterface returned no interface"); |
|
|
|
print_error = false; |
|
|
|
} |
|
|
|
|
|
|
|
return {}; |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
@ -200,7 +200,14 @@ std::optional<NetworkInterface> GetSelectedNetworkInterface() { |
|
|
|
}); |
|
|
|
|
|
|
|
if (res == network_interfaces.end()) { |
|
|
|
LOG_DEBUG(Network, "Couldn't find selected interface \"{}\"", selected_network_interface); |
|
|
|
// Only print the error once to avoid log spam
|
|
|
|
static bool print_error = true; |
|
|
|
if (print_error) { |
|
|
|
LOG_ERROR(Network, "Couldn't find selected interface \"{}\"", |
|
|
|
selected_network_interface); |
|
|
|
print_error = false; |
|
|
|
} |
|
|
|
|
|
|
|
return std::nullopt; |
|
|
|
} |
|
|
|
|
|
|
|
|