DEV9: Log when we fail to get adapter information for internal servers

This commit is contained in:
TheLastRar 2021-09-26 15:59:40 +01:00 committed by refractionpcsx2
parent 2d0ad7fb72
commit 26ea5bcfed
2 changed files with 9 additions and 0 deletions

View File

@ -563,7 +563,10 @@ TAPAdapter::TAPAdapter()
if (TAPGetWin32Adapter(config.Eth, &adapter, &buffer))
InitInternalServer(&adapter);
else
{
Console.Error("DEV9: Failed to get adapter information");
InitInternalServer(nullptr);
}
isActive = true;
}

View File

@ -376,7 +376,10 @@ PCAPAdapter::PCAPAdapter()
if (PCAPGetWin32Adapter(config.Eth, &adapter, &buffer))
InitInternalServer(&adapter);
else
{
Console.Error("DEV9: Failed to get adapter information");
InitInternalServer(nullptr);
}
#elif defined(__POSIX__)
ifaddrs adapter;
ifaddrs* buffer;
@ -386,7 +389,10 @@ PCAPAdapter::PCAPAdapter()
freeifaddrs(buffer);
}
else
{
Console.Error("DEV9: Failed to get adapter information");
InitInternalServer(nullptr);
}
#endif
if (pcap_io_init(config.Eth, config.EthApi == NetApi::PCAP_Switched, newMAC) == -1)